summaryrefslogtreecommitdiffstats
path: root/adduser/rmuser.8
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>1997-03-08 18:04:45 +0000
committerWolfram Schneider <wosch@FreeBSD.org>1997-03-08 18:04:45 +0000
commit590d6095f555d91a4dac6c2d12e64b4033aef670 (patch)
treebdee0b2ad59cb1b49342ad745e7594ff199ca6df /adduser/rmuser.8
parent447a83f3ce4af3c292caed1151b99c5ac6c78e49 (diff)
downloadpw-darwin-590d6095f555d91a4dac6c2d12e64b4033aef670.tar.gz
pw-darwin-590d6095f555d91a4dac6c2d12e64b4033aef670.tar.zst
pw-darwin-590d6095f555d91a4dac6c2d12e64b4033aef670.zip
Cleaned up some messages, added a check to remove a leftover popd file
from /var/mail, added a routine to delete the removed user's files from /tmp, /var/tmp, & /var/tmp/vi.recover, and added code to kill any running processes owned by the removed user). I've also added a flag for non-interactive execution, cleaned up the man page, and adjusted my address. Submitted by: ghelmer@cs.iastate.edu (Guy Helmer)
Diffstat (limited to 'adduser/rmuser.8')
-rw-r--r--adduser/rmuser.8107
1 files changed, 86 insertions, 21 deletions
diff --git a/adduser/rmuser.8 b/adduser/rmuser.8
index 88195cd..6f45458 100644
--- a/adduser/rmuser.8
+++ b/adduser/rmuser.8
@@ -1,5 +1,5 @@
-.\" Copyright 1995, 1996
-.\" Guy Helmer, Madison, South Dakota 57042. All rights reserved.
+.\" Copyright 1995, 1996, 1997
+.\" Guy Helmer, Ames, Iowa 50014. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -26,50 +26,92 @@
.\"
.\" $Id$
.\"
-.Dd July 16, 1996
+.Dd February 23, 1997
.Dt RMUSER 8
.Os
.Sh NAME
.Nm rmuser
-.Nd remove users from the system
+.Nd removes users from the system
.Sh SYNOPSIS
.Nm rmuser
+.Op Fl y
.Op Ar username
.Sh DESCRIPTION
-The
+The utility
.Nm rmuser
-utility removes a user's
+.Pp
+.Bl -enum
+.It
+Removes the user's
.Xr crontab 1
-entry (if any) and any
+entry (if any)
+.It
+Removes any
.Xr at 1
-jobs belonging to the user,
-then removes a user from the system's local password file, removes
-the user's home directory if it is owned by the user, and removes
-the user's incoming mail file if it exists. The username is removed
-from any groups to which it belongs in the file
+jobs belonging to the user
+.It
+Sends a SIGKILL signal to all processes owned by the user
+.It
+Removes the user from the system's local password file
+.It
+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
+.It
+Removes the incoming mail and pop daemon mail files belonging to the
+user from
+.Pa /var/mail
+.It
+Removes all files owned by the user from
+.Pa /tmp ,
+.Pa /var/tmp ,
+and
+.Pa /var/tmp/vi.recover .
+.It
+Removes the username from all groups to which it belongs in
.Pa /etc/group .
-If a group becomes empty and the group name is the same as the username,
-the group is removed (this complements
+(If a group becomes empty and the group name is the same as the username,
+the group is removed; this complements
.Xr adduser 8 's
per-user unique groups).
+.El
.Pp
.Nm rmuser
politely refuses to remove users whose uid is 0 (typically root), since
-it seemed like a good idea at the time
-.Nm rmuser
-was written.
+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
+.Xr vipw 8
+for information on directly editing the password file, by which the desired
+user's
+.Xr passwd 5
+entry may be removed manually.
.Pp
+If not running "affirmitively" (i.e., option
+.Fl y
+is not specified),
.Nm 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 (and not by any other user),
+by the user,
.Nm rmuser
asks whether you wish to remove the user's home directory and everything
below.
.Pp
+As
+.Nm 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
+.Nm rmuser
+to continue, it will.
+.Pp
Available options:
.Pp
.Bl -tag -width username
+.It Fl 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.
.It Ar \&username
Identifies the user to be removed; if not present,
.Nm rmuser
@@ -98,7 +140,30 @@ interactively asks for the user to be removed.
.Sh HISTORY
The
.Nm
-command appeared in
-.Fx 2.1.5 .
+command appeared in
+.Fx 2.2 .
.\" .Sh AUTHOR
-.\" Guy Helmer, Madison, South Dakota
+.\" Guy Helmer, Ames, Iowa
+.Sh BUGS
+.Nm 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.
+.Nm rmuser
+also is unable to remove symbolic links that were created by the
+user in
+.Pa /tmp
+or
+.Pa /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
+.Pa /var/mail
+other than
+.Pa /var/mail/username
+and
+.Pa /var/mail/.pop.username
+that are not owned by the removed user but should be removed.
+.Pp
+.Nm rmuser
+has no knowledge of NIS (Yellow Pages), and it operates only on the
+local password file.