RMUSER(8)
π rmuser(8) β like, the manual page, but make it make sense
okay so bestie, welcome to RMUSER(8), from the System Manager's Manual section (that's section 8, the sysadmin one, iykyk). This is the page about rmuser β the utility that removes users from the system. Sit down, grab a strawberry π, we're gonna go through it together.
β¨ NAME β¨
rmuser β remove users from the system π«Ά
πΈ SYNOPSIS πΈ
rmuser [-yv] [-f file] [username ...]
π DESCRIPTION π
The rmuser utility removes one or more users submitted on the command line or from a file. And when I say "removes a user from the system," I mean it does the whole entire ritual, no crumbs left. Here's the exact run-down, in order, bestie:
- Removes the user's
crontab(1)entry (if any). - Removes any
at(1)jobs belonging to the user. - Sends a
SIGKILLsignal to all processes owned by the user. yeah. it's giving no mercy π - Removes the user from the system's local password file.
- 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.
- 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 complementsadduser(8)'s per-user unique groups.) β cute little team-up, love that for them π - Removes all message queues, shared memory segments and semaphores owned by the user.
β οΈ Now the part where you listen to me. Thermuserutility refuses to remove users whose UID is0(typicallyroot), 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. Like, it's protecting you from yourself, bestie π«Ά. If it is necessary to remove a user whose UID is0, seevipw(8)for information on directly editing the password file.
If rmuser was not invoked with the -y option, it will show the selected user's password file entry and ask for confirmation that the user be removed. It will then ask for confirmation to delete the user's 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. (iconic behavior honestly β consent checks β¨)
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. main character energy: keeps going π
The options are as follows:
π OPTIONS π
-ffile β Thermuserutility will get a list of users to be removed from file, which will contain one user per line. Anything following a hash mark (#), including the hash mark itself, is considered a comment and will not be processed. But β if the file is owned by anyone other than a user with UID0, or is writable by anyone other than the owner,rmuserwill refuse to continue. no cap, it will not budge π-yβ Implicitly answer "yes" to any and all prompts. Currently, this includes prompts on whether to remove the specified user and whether to remove the home directory. This option requires that either the-foption be used, or one or more user names be given as command line arguments.-vβ Enable verbose mode. Normally, the output includes one line per removed user; however, with this optionrmuserwill be much more chatty about the steps taken. (yapper mode: activated π₯)- username β Identifies one or more users to be removed; if not present,
rmuserinteractively asks for one or more users 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), adduser(8), pw(8), pwd_mkdb(8), vipw(8)
like, the whole friend group π«Ά
β HISTORY β
The rmuser utility appeared in FreeBSD 2.2. she's been around, she's a legend π
π BUGS π
The rmuser utility does not comprehensively search the file system 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. π
It is also unable to remove symbolic links that were created by the user in /tmp or /var/tmp, as symbolic links on 4.4BSD file systems do not contain information as to who created them. (the symlinks are anonymous, they refuse to snitch π)
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.
The rmuser utility has no knowledge of YP/NIS, and it operates only on the local password file.
okay that's the whole page, bestie, go forth and remove users responsibly π β this lil sign-off comes to you straight from Debian, dated May 10, 2002, and yes the date is older than most of us on this app but she's still slaying πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 1995, 1996, 1997 Guy Helmer, Ames, Iowa 50014. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms