DESCRIPTION
The rmuser utility removes one or more users submitted on the command line or from a file. In removing a user from the system, this utility: - Removes the users crontab(1) entry (if any).
- Removes any at(1) jobs belonging to the user.
- Sends a SIGKILL signal to all processes owned by the user.
- Removes the user from the systems local password file.
- Removes the users home directory (if it is owned by the user), including handling of symbolic links in the path to the actual home directory.
- Removes the incoming mail and POP daemon mail files belonging to the user from /var/mail.
- Removes all files owned by the user from /tmp, /var/tmp, and /var/tmp/vi.recover.
- Removes the username from all groups to which it belongs in /etc/group. (If a group becomes empty and the group name is the same as the username, the group is removed; this complements adduser 8 s per-user unique groups.)
- Removes all message queues, shared memory segments and semaphores owned by the user.
The rmuser utility refuses to remove users whose UID is 0 (typically root), since certain actions (namely, killing all the users processes, and perhaps removing the users home directory) would cause damage to a running system. If it is necessary to remove a user whose UID is 0, see vipw(8) for information on directly editing the password file.
If rmuser was not invoked with the -y option, it will show the selected users password file entry and ask for confirmation that the user be removed. It will then ask for confirmation to delete the users home directory. If the answer is in the affirmative, the home directory and any files and subdirectories under it will be deleted only if they are owned by the user. See pw(8) for more details.
As rmuser operates, it informs the user regarding the current activity. If any errors occur, they are posted to standard error and, if it is possible for rmuser to continue, it will.
The options are as follows: