]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/adduser/rmuser.8
This commit was generated by cvs2svn to compensate for changes in r86198,
[FreeBSD/FreeBSD.git] / usr.sbin / adduser / rmuser.8
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
40 The utility
41 .Nm
42 .Pp
43 .Bl -enum
44 .It
45 Removes the user's
46 .Xr crontab 1
47 entry (if any).
48 .It
49 Removes any
50 .Xr at 1
51 jobs belonging to the user.
52 .It
53 Sends a SIGKILL signal to all processes owned by the user.
54 .It
55 Removes the user from the system's local password file.
56 .It
57 Removes the user's home directory (if it is owned by the user),
58 including handling of symbolic links in the path to the actual home
59 directory.
60 .It
61 Removes the incoming mail and pop daemon mail files belonging to the
62 user from
63 .Pa /var/mail .
64 .It
65 Removes all files owned by the user from
66 .Pa /tmp ,
67 .Pa /var/tmp ,
68 and
69 .Pa /var/tmp/vi.recover .
70 .It
71 Removes the username from all groups to which it belongs in
72 .Pa /etc/group .
73 (If a group becomes empty and the group name is the same as the username,
74 the group is removed; this complements
75 .Xr adduser 8 Ns 's
76 per-user unique groups).
77 .El
78 .Pp
79 .Nm Rmuser
80 politely refuses to remove users whose uid is 0 (typically root), since
81 certain actions (namely, killing all the user's processes, and perhaps
82 removing the user's home directory) would cause damage to a running system.
83 If it is necessary to remove a user whose uid is 0, see
84 .Xr vipw 8
85 for information on directly editing the password file, by which the desired
86 user's
87 .Xr passwd 5
88 entry may be removed manually.
89 .Pp
90 If not running "affirmatively" (i.e., option
91 .Fl y
92 is not specified),
93 .Nm
94 shows the selected user's password file entry and asks for confirmation
95 that you wish to remove the user.  If the user's home directory is owned
96 by the user,
97 .Nm
98 asks whether you wish to remove the user's home directory and everything
99 below.
100 .Pp
101 As
102 .Nm
103 operates, it informs the user regarding the current activity.  If any
104 errors occur, they are posted to standard error and, if it is possible for
105 .Nm
106 to continue, it will.
107 .Pp
108 Available options:
109 .Pp
110 .Bl -tag -width username
111 .It Fl y
112 Affirm - any question that would be asked is answered implicitly in
113 the affirmative (i.e., yes).  A username must also be specified on the
114 command line if this option is used.
115 .It Ar \&username
116 Identifies the user to be removed; if not present,
117 .Nm
118 interactively asks for the user to be removed.
119 .El
120 .Sh FILES
121 .Bl -tag -width /etc/master.passwd -compact
122 .It Pa /etc/master.passwd
123 .It Pa /etc/passwd
124 .It Pa /etc/group
125 .It Pa /etc/spwd.db
126 .It Pa /etc/pwd.db
127 .El
128 .Sh SEE ALSO
129 .Xr at 1 ,
130 .Xr chpass 1 ,
131 .Xr crontab 1 ,
132 .Xr finger 1 ,
133 .Xr passwd 1 ,
134 .Xr group 5 ,
135 .Xr passwd 5 ,
136 .Xr adduser 8 ,
137 .Xr pwd_mkdb 8 ,
138 .Xr vipw 8
139 .Sh HISTORY
140 The
141 .Nm
142 command appeared in
143 .Fx 2.2 .
144 .\" .Sh AUTHOR
145 .\" Guy Helmer, Ames, Iowa
146 .Sh BUGS
147 .Nm Rmuser
148 does not comprehensively search the filesystem for all files
149 owned by the removed user and remove them; to do so on a system
150 of any size is prohibitively slow and I/O intensive.
151 .Nm Rmuser
152 also is unable to remove symbolic links that were created by the
153 user in
154 .Pa /tmp
155 or
156 .Pa /var/tmp
157 as symbolic links on
158 .Bx 4.4
159 filesystems do not contain information
160 as to who created them.  Also, there may be other files created in
161 .Pa /var/mail
162 other than
163 .Pa /var/mail/username
164 and
165 .Pa /var/mail/.pop.username
166 that are not owned by the removed user but should be removed.
167 .Pp
168 .Nm Rmuser
169 has no knowledge of NIS (Yellow Pages), and it operates only on the
170 local password file.