Remember to use --help (example usermod --help to see a help list for that command
Since adding and editing users is an administrator thing, you must be root (or use sudo) to execute the add/mod/del commands aboveOther commands I will not cover are newgrp, gpasswd
# groupadd developers
useradd -g wheel -G users -m -N -s /bin/bash newusername
# useradd -G developers mreschke
or add user 'mreschke' and set to multiple groups
# useradd -G admins,ftp,www,developers mreschke
groupadd lfs
useradd -s /bin/bash -g lfs -m lfs
The meaning of the command line options:
-s /bin/bash
This makes bash the default shell for user lfs.
-g lfs
This option adds user lfs to group lfs.
-m
This creates a home directory for lfs.
lfs
This is the actual name for the created group and user.
usermod -g www mreschke
usermod -a -G ftp mreschke
# or easier still just run
adduser mreschke ftp
# usermod -l newuser olduser
# groupmod -n newgroup oldgroup
# mv -f /home/olduser /home/newuser
# Now edit /etc/passwd and change the olduser home directory to /home/newuser