Linux User Management
Create User
useradd
- Native binary compiled with the system
- Creates only a user by default (you have to use switches) to specify home directories and other settings
adduser
- Perl script which uses
useradd
among others - More user friendly and interactive
- Creates a fully functional user on the system by default
Groups
Create Group
groupadd examplegroup
Add user to group
usermod -a -G examplegroup exampleusername
adduser exampleusername examplegroup
gpasswd -a exampleusername examplegroup
Remove user from group
gpasswd -d exampleuser examplegroup
Change user's primary group
usermod -g groupname username