Add User To System
To add a new user to the system, we can use useradd
command.
Create A User
Step 1
Note: -m
or --create-home
argument here creates home directory as well.
Step 2
To be able to login into the new user, we need to set password first.
Create A User with specific login shell
To create a user with specific login shell, we can pass -s
or --shell
argument.
Add User to sudo group
In order to run commands as root, we can add user to sudo
group by using usermod
command.
Source(s)
Last updated