Create/Delete Users on Linux Machines
Create Users
Create user with default using bash shell -s
(--shell
) and home directory -m
(--create-home
)
$ sudo useradd -m -s /bin/bash <usrname>
$ sudo passwd <usrname>
Delete Users
Delete that user’s home directory and mail spool by using the -r
flag with the command
$ sudo userdel -r <usrname>