RMUSER(8)

NAME
rmuser - removes users from the system

SYNOPSIS
rmuser [-y] [username]

DESCRIPTION
The utility rmuser

1.  Removes the user's crontab(1) entry (if any).

2.  Removes any at(1) jobs belonging to the user.

3.  Sends a SIGKILL signal to all processes owned by the user.

4.  Removes the user from the system's local password file.

5.  Removes the user's home directory (if it is owned by the user), including handling of symbolic links in the path to the actual home directory.

6.  Removes the incoming mail and pop daemon mail files belonging to the user from /var/mail.

7.  Removes all files owned by the user from /tmp, /var/tmp, and /var/tmp/vi.recover.

8.  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).

Rmuser politely refuses to remove users whose uid is 0 (typically root), since certain actions (namely, killing all the user's processes, and perhaps removing the user's 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, by which the desired user's passwd(5) entry may be removed manually.

If not running "affirmatively" (i.e., option -y is not specified), rmuser shows the selected user's password file entry and asks for confirmation that you wish to remove the user. If the user's home directory is owned by the user, rmuser asks whether you wish to remove the user's home directory and everything below.

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.

Available options:

-y  Affirm - any question that would be asked is answered implicitly in the affirmative (i.e., yes). A username must also be specified on the command line if this option is used.

username
    Identifies the user to be removed; if not present, rmuser interactively asks for the user to be removed.

FILES
/etc/master.passwd
/etc/passwd
/etc/group
/etc/spwd.db
/etc/pwd.db

SEE ALSO
at(1), chpass(1), crontab(1), finger(1), passwd(1), group(5), passwd(5), addgroup(8), adduser(8), pwd_mkdb(8), rmgroup(8), vipw(8)

HISTORY
The rmuser command appeared in FreeBSD 2.2.

BUGS
Rmuser does not comprehensively search the filesystem for all files owned by the removed user and remove them; to do so on a system of any size is prohibitively slow and I/O intensive. Rmuser also is unable to remove symbolic links that were created by the user in /tmp or /var/tmp as symbolic links on 4.4BSD filesystems do not contain information as to who created them. Also, there may be other files created in /var/mail other than /var/mail/username and /var/mail/.pop.username that are not owned by the removed user but should be removed.

Rmuser has no knowledge of NIS (Yellow Pages), and it operates only on the local password file.