Installation guide
9.4.1 Removing a User Account with the removeuser Utility
The removeuser utility automates the process of removing a user account.
This utility performs the following tasks:
1. Removes the user’s entry from the /etc/passwd file and any
references to the user’s account from the /etc/group file
2. Searches several administrative directories and files for occurrences of
the user and informs you if they exist
3. Allows the removal of the home directory, which includes directories
and files, and mail files
To use the removeuser utility, log in as root. At the prompt, enter:
# removeuser
The program responds with a series of prompts and messages, as shown in
the following example:
Enter a login name to be removed or <RETURN> to exit: kalle
This is the entry for (kalle) in the /etc/passwd file:
kalle:/v7ZY9/tF1z5w:12:15:Kalle Anderson:/usr/users/kalle:/ksh
Is this the entry you want to delete (y/n)? y
Working ...
Entry for (kalle) removed.
Searching relevant directories and files for user (kalle) ...
None found.
Do you want to remove the home directory, all subdirectories,
files and mail for (kalle) (y/n)? y
The files for (kalle) will be lost if not backed up.
Are you sure you want to remove these files (y/n)? y
Removing /usr/users/kalle
Removing /usr/spool/mail/kalle
Finished removing user account for (kalle)
9.4.2 Removing a User Account Manually
To manually remove a user account from your system:
1. Remove the user’s files and directories.
2. Remove the user’s entry from the group file.
3. Remove the user’s entry from the passwd file.
4. Remove the user’s /usr/spool/mail/username file.
The following sections describe each task and provide instructions for
removing the files and directories.
9–18 Administering User Accounts and Groups