rmuser.8 (99968) | rmuser.8 (107543) |
---|---|
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 --- 10 unchanged lines hidden (view full) --- 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.\" | 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 --- 10 unchanged lines hidden (view full) --- 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: head/usr.sbin/adduser/rmuser.8 99968 2002-07-14 14:47:15Z charnier $ | 27.\" $FreeBSD: head/usr.sbin/adduser/rmuser.8 107543 2002-12-03 05:41:09Z scottl $ |
28.\" | 28.\" |
29.Dd February 23, 1997 | 29.Dd May 10, 2002 |
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 | 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 | 38.Op Fl f Ar file 39.Op Ar username ... |
39.Sh DESCRIPTION 40The 41.Nm | 40.Sh DESCRIPTION 41The 42.Nm |
42utility | 43utility removes one or more users submitted on the command line 44or from a file. In removing a user from the system, this utility |
43.Pp 44.Bl -enum 45.It 46Removes the user's 47.Xr crontab 1 48entry (if any). 49.It 50Removes any --- 21 unchanged lines hidden (view full) --- 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 | 45.Pp 46.Bl -enum 47.It 48Removes the user's 49.Xr crontab 1 50entry (if any). 51.It 52Removes any --- 21 unchanged lines hidden (view full) --- 74Removes the username from all groups to which it belongs in 75.Pa /etc/group . 76(If a group becomes empty and the group name is the same as the username, 77the group is removed; this complements 78.Xr adduser 8 Ns 's 79per-user unique groups). 80.El 81.Pp |
80The | 82The |
81.Nm | 83.Nm |
82utility 83politely refuses to remove users whose uid is 0 (typically root), since | 84utility 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 | 85certain actions (namely, killing all the user's processes, and perhaps 86removing the user's home directory) would cause damage to a running system. 87If it is necessary to remove a user whose uid is 0, see 88.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. | 89for information on directly editing the password file |
92.Pp | 90.Pp |
93If not running "affirmatively" (i.e., option 94.Fl y 95is not specified), | 91If |
96.Nm | 92.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. | 93was not invoked with the 94.Fl y 95switch it will 96show the selected user's password file entry and ask for confirmation 97that the user be removed. It will then ask for confirmation to delete 98the user's home directory. If the answer is in the affirmative, the home 99directory and any files and subdirectories under it will be deleted only if 100they are owned by the user. See 101.Xr pw 8 102for more details. |
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 | 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. | 115Implicitly answer "yes" to any and all prompts. Currently this includes 116prompts on whether to remove the specified user and whether to remove 117the home directory. This option requires that either the 118.Fl f 119option be used or one or more user names be given as commmand line 120arguments. 121.It Fl f 122The 123.Nm 124utility will get a list of users to be removed from 125.Ar file , 126which will contain one user per line. Anything following a hash mark (#), 127including the hash mark itself, is considered a comment and will not 128be processed. If the file is owned by anyone other than a user with 129uid 0 or is writeable by anyone other than the owner 130.Nm 131will refuse to continue. |
118.It Ar \&username | 132.It Ar \&username |
119Identifies the user to be removed; if not present, | 133Identifies one or more users to be removed; if not present, |
120.Nm | 134.Nm |
121interactively asks for the user to be removed. | 135interactively asks for one or more users 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 , | 136.El 137.Sh FILES 138.Bl -tag -width /etc/master.passwd -compact 139.It Pa /etc/master.passwd 140.It Pa /etc/passwd 141.It Pa /etc/group 142.It Pa /etc/spwd.db 143.It Pa /etc/pwd.db 144.El 145.Sh SEE ALSO 146.Xr at 1 , 147.Xr chpass 1 , 148.Xr crontab 1 , 149.Xr finger 1 , 150.Xr passwd 1 , 151.Xr group 5 , 152.Xr passwd 5 , 153.Xr adduser 8 , |
154.Xr pw 8 , |
|
140.Xr pwd_mkdb 8 , 141.Xr vipw 8 142.Sh HISTORY 143The 144.Nm | 155.Xr pwd_mkdb 8 , 156.Xr vipw 8 157.Sh HISTORY 158The 159.Nm |
145utility appeared in | 160command 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. | 161.Fx 2.2 . 162.\" .Sh AUTHOR 163.\" Guy Helmer, Ames, Iowa 164.Sh BUGS 165The 166.Nm 167utility does not comprehensively search the filesystem for all files 168owned by the removed user and remove them; to do so on a system 169of 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 | 170It is also 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. | 171user in 172.Pa /tmp 173or 174.Pa /var/tmp 175as symbolic links on 176.Bx 4.4 177filesystems do not contain information 178as to who created them. Also, there may be other files created in 179.Pa /var/mail 180other than 181.Pa /var/mail/username 182and 183.Pa /var/mail/.pop.username 184that are not owned by the removed user but should be removed. 185.Pp 186The 187.Nm 188utility has no knowledge of NIS (Yellow Pages), and it operates only on the 189local password file. |