Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

addgroup(8)

adduser(8)

finger(1)

mkpasswd(8)

passwd(1)

vipw(8)

removeuser(8)  —  Maintenance

NAME

removeuser − Deletes user accounts interactively

SYNOPSIS

/usr/sbin/removeuser

DESCRIPTION

Security Note

If you have enhanced security installed on your system, you should use the XSysAdmin the windowing interface to remove users.  See the Security and the XSysAdmin(8) reference page for more information. 

The removeuser command is an interactive program for deleting user accounts from your system.  It also gives the option of deleting the user’s home directory, files and mail.  The program prompts you for specific information and informs you of its activity and error conditions. 

Only the superuser can execute this command. 

The program performs the following tasks:

       •Asks for a login name for the user to be deleted.  Enter the login name.  If this entry does not exist in the /etc/passwd file, the program informs you of this and exits.  If the entry does exist, the program continues. 

       •Displays the entry for the user from the /etc/passwd file and asks if this is the entry you wish to delete.  If the answer to this query is no, the program indicates that the user was not deleted and then exits.  If the answer to this query is yes, the program deletes the user’s entry from the /etc/passwd file and any occurrences of the user from the /etc/group file.  It then states that the user was deleted. 

       •Searches several administrative directories and files for occurrences of the user and informs you if they exist.  If so, it suggests that you may wish to delete these occurrences when the program is finished.  If no occurrences of the user are found in these directories and files, the program indicates so. 

       •Asks if you want to delete the home directory, all subdirectories, and all mail files for the user.  If the answer to this query is no, the program indicates that the user’s home directory was not deleted and then exits.  If the answer to this query is yes, the program continues.  As a precaution, the program reminds you that you should have backed up the files for the user before removing them if you do not wish to lose them.  It then asks if you are sure that you want to delete the files for this user.  If the answer to this query is no, the program indicates that the user’s home directory was not deleted and then exits.  If the answer to this query is yes, the program states that it is removing the user’s home directory, its contents and the user’s mail file.  It then deletes these items.  At this point, the program ends. 

EXAMPLE

Enter a login name to be removed or <Return> to exit: john
This is the entry for (john) in the /etc/passwd file:

john:VSh6/xbMqPDcY:5006:15:sdf:/usr/users/john:

Is this the entry you want to delete (y/n)? y
Working ...
Entry for (john) removed.
Searching relevant directories and files for (john) ...
None found.
Do you want to remove the home directory, all subdirectories,
files, and mail for (john) (y/n)? y
The files for (john) will be lost if not backed up.
Are you sure you want to remove these files (y/n)? y
Deleting /usr/users/john
Deleting /usr/spool/mail/john

FILES

/usr/sbin/removeuser
Specifies the command path.

RELATED INFORMATION

Commands:  addgroup(8), adduser(8), finger(1), mkpasswd(8), passwd(1), vipw(8)

Files:

/etc/groupGroup file

/etc/passwdPassword file

/etc/ptmpLock file

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026