# useradd -m -s /usr/bin/sh renay
Create an account for a user named Tracy. Tracy’s primary group is staff. Tracy is also in the groups pe and chemistry. Create a home directory. Take all the rest of the defaults.
# useradd -m -g staff -G pe,chemistry tracy
Display the useradd defaults.
# useradd -D
Change the default group to others.
# useradd -D -g others
To delete a user use the userdel command. The syntax is
# userdel -r login
The -r option is needed to delete the user’s home directory.
The syntax of the groupadd command is
# groupadd [-g gid [-o]]group
Add a group called economics. Use the next available group ID greater than 100.
# groupadd economics