Linux Users

A user can refer to either a local user that a real person uses interactively or a system user that is used to set permissions on system processes.


Creating Users

See adduser(8) and useradd(8). The former is simpler and can be used interactively.

Privileged Users

Standard practice is that privileged users are in the wheel group. This is managed by the sudoers file.

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL

Either use visudo or edit /etc/sudoers directly to ensure that this line is uncommented.

Therefore, to escalate a user's privileges, try

adduser USERNAME wheel

Custom Groups

To create a custom group, see addgroup(8) and groupadd(8). The former is simpler.

Then to add a user to that group, try:

adduser USERNAME GROUPNAME


Configuration

adduser(8) and useradd(8) both look at /etc/default/useradd for a number of variables. The default login shell (SHELL), the base directory for home directory creation (HOME), and so on.

adduser(8) additionally looks to /etc/logins.def. Much of this file relates to interactive login configuration, but a short list of variables are used in user creation. UID_MIN and UID_MAX define the range for local user IDs, while SYS_UID_MIN and SYS_UID_MAX define the range for system user IDs. (The parallel GID_MIN, GID_MAX, SYS_GID_MIN, and SYS_GID_MAX variables do the same for group IDs.)


CategoryRicottone

Linux/Users (last edited 2023-06-29 16:52:38 by DominicRicottone)