Open System Services Shell and Utilities Reference Manual (G06.29+, H06.08+, J06.03+)

userdel(8) OSS Shell and Utilities Reference Manual
NAME
userdel - Deletes a user account and removes related files.
SYNOPSIS
userdel [OPTION] LOGIN
userdel -A ALIAS_NAME [OPTION]
FLAGS
-A ALIAS_NAME
Delete user alias with name ALIAS_NAME.
This option is only valid if Safeguard is running on the system. If Safeguard is not running,
a diagnostic message is reported on STDERR and the command exits with the exit status of
15.
-f This option forces the removal of the user account, even if the user is still logged in. It also
forces userdel to remove the user’s home directory, even if another user uses the same
home directory. Warning: This option can leave your system in an inconsistent state.
-h Display help message and exit.
-r Files in the user’s home directory will be removed along with the home directory itself.
Search for files located in other file systems and delete manually.
DESCRIPTION
The userdel command modifies the system account files, deleting all entries that refer to the user
name LOGIN. The named user must exist.
You can specify the LOGIN name in a fully qualified form
groupName.memberName:groupNum,memberNum’ (no white spaces); or a partial name contain-
ing only the memberName. When a partial name is used, the group name and corresponding group
number will be taken from the GROUP variable in the /etc/default/users file.
In the userdel -A alias [OPTION] form, the specified alias is deleted.
NOTES
Manually check all file systems to ensure that no files remain owned by this user.
FILES
/etc/default/users
Default values for account creation.
EXIT VALUES
The userdel command exits with the following values:
0 success
2 invalid command syntax
6 specified user or alias does not exist
7 specified user is associated with one or more aliases
8 user or alias currently logged in
11 insufficient privilege
12 cannot remove home directory
15 Safeguard is not available, invalid option
RELATED INFORMATION
login.defs(5), users(5), newusers(8), useradd(8), usermod(8).
1276 Hewlett-Packard Company 527188-021