1.\" Copyright 1995, 1996, 1997 2.\" Guy Helmer, Ames, Iowa 50014. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer as 9.\" the first lines of this file unmodified. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. The name of the author may not be used to endorse or promote products 14.\" derived from this software without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY GUY HELMER ``AS IS'' AND ANY EXPRESS OR 17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19.\" IN NO EVENT SHALL GUY HELMER BE LIABLE FOR ANY DIRECT, INDIRECT, 20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26.\" 27.\" $FreeBSD$ 28.\" 29.Dd February 23, 1997 30.Dt RMUSER 8 31.Os 32.Sh NAME 33.Nm rmuser 34.Nd removes users from the system 35.Sh SYNOPSIS 36.Nm 37.Op Fl y 38.Op Ar username 39.Sh DESCRIPTION 40The 41.Nm 42utility 43.Pp 44.Bl -enum 45.It 46Removes the user's 47.Xr crontab 1 48entry (if any). 49.It 50Removes any 51.Xr at 1 52jobs belonging to the user. 53.It 54Sends a SIGKILL signal to all processes owned by the user. 55.It 56Removes the user from the system's local password file. 57.It 58Removes the user's home directory (if it is owned by the user), 59including handling of symbolic links in the path to the actual home 60directory. 61.It 62Removes the incoming mail and pop daemon mail files belonging to the 63user from 64.Pa /var/mail . 65.It 66Removes all files owned by the user from 67.Pa /tmp , 68.Pa /var/tmp , 69and 70.Pa /var/tmp/vi.recover . 71.It 72Removes the username from all groups to which it belongs in 73.Pa /etc/group . 74(If a group becomes empty and the group name is the same as the username, 75the group is removed; this complements 76.Xr adduser 8 Ns 's 77per-user unique groups). 78.El 79.Pp 80The 81.Nm 82utility 83politely refuses to remove users whose uid is 0 (typically root), since 84certain actions (namely, killing all the user's processes, and perhaps 85removing the user's home directory) would cause damage to a running system. 86If it is necessary to remove a user whose uid is 0, see 87.Xr vipw 8 88for information on directly editing the password file, by which the desired 89user's 90.Xr passwd 5 91entry may be removed manually. 92.Pp 93If not running "affirmatively" (i.e., option 94.Fl y 95is not specified), 96.Nm 97shows the selected user's password file entry and asks for confirmation 98that you wish to remove the user. If the user's home directory is owned 99by the user, 100.Nm 101asks whether you wish to remove the user's home directory and everything 102below. 103.Pp 104As 105.Nm 106operates, it informs the user regarding the current activity. If any 107errors occur, they are posted to standard error and, if it is possible for 108.Nm 109to continue, it will. 110.Pp 111Available options: 112.Pp 113.Bl -tag -width username 114.It Fl y 115Affirm - any question that would be asked is answered implicitly in 116the affirmative (i.e., yes). A username must also be specified on the 117command line if this option is used. 118.It Ar \&username 119Identifies the user to be removed; if not present, 120.Nm 121interactively asks for the user to be removed. 122.El 123.Sh FILES 124.Bl -tag -width /etc/master.passwd -compact 125.It Pa /etc/master.passwd 126.It Pa /etc/passwd 127.It Pa /etc/group 128.It Pa /etc/spwd.db 129.It Pa /etc/pwd.db 130.El 131.Sh SEE ALSO 132.Xr at 1 , 133.Xr chpass 1 , 134.Xr crontab 1 , 135.Xr finger 1 , 136.Xr passwd 1 , 137.Xr group 5 , 138.Xr passwd 5 , 139.Xr adduser 8 , 140.Xr pwd_mkdb 8 , 141.Xr vipw 8 142.Sh HISTORY 143The 144.Nm 145utility appeared in 146.Fx 2.2 . 147.\" .Sh AUTHOR 148.\" Guy Helmer, Ames, Iowa 149.Sh BUGS 150The 151.Nm 152utility does not comprehensively search the filesystem for all files 153owned by the removed user and remove them; to do so on a system 154of any size is prohibitively slow and I/O intensive. 155The 156.Nm 157utility also is unable to remove symbolic links that were created by the 158user in 159.Pa /tmp 160or 161.Pa /var/tmp 162as symbolic links on 163.Bx 4.4 164filesystems do not contain information 165as to who created them. Also, there may be other files created in 166.Pa /var/mail 167other than 168.Pa /var/mail/username 169and 170.Pa /var/mail/.pop.username 171that are not owned by the removed user but should be removed. 172.Pp 173The 174.Nm 175utility has no knowledge of NIS (Yellow Pages), and it operates only on the 176local password file. 177