Linux/User Management
< Linux
Jump to navigation
Jump to search
Commands to manage user accounts in linux.
Creating a New User
The most basic implementation is:
useradd <username>
From there, you can add argument options such as:
-Mor--no-create-home- Skips creating a home directory for user.-Nor--no-user-group- Skips creating a group with the same name as user.-Gor--groups- Set additional user groups user is part of, during user creation.-ror--system- Create a "system" account. Aka, a user with no password, no home directory, and is unable to log in.
Example:
useradd -G admins,webadmin,developers my_user
This creates a user called "my_user" that is associated with groups "admins", "webadmin", and "developers".