|
Quick links About
userdel Syntax Examples
Related commands Linux / Unix main page
About userdel
Enables a super user to remove a users account.
Syntax
userdel [-r] login
| -r |
Files in the user's home directory will be removed along with the home directory itself and the user's mail spool. Files located in other file systems will have to be searched for and deleted manually. |
EXIT VALUES
0 - success
1 - can't update password file
2 - bad command syntax
6 - specified user doesn't exist
8 - user currently logged in
10 - can't update group file
12 - can't remove home directory
Examples
Note: For these commands to work you must
have super user rights or be logged in as root.
userdel -r newperson
In the above example the userdel command would
remove the newperson account and also the newpersons home
directory directory, in this case (/home/newperson).
Related commands
useradd
usermod
|