admuserdel(1M)

NAME
admuserdel - deletes a user's login

SYNOPSIS

admuserdel [-r] [-x ns=NIS+|NIS|NONE]
[-x serv=server]
[-x domain=domain|rhost=host]
[-x rmmail=Y|N]
[-x predel=script] [-x postdel=script]
login...

DESCRIPTION
The Solstice admuserdel command deletes a user's login entry from the password database.

AVAILABILITY

SUNWsadmb package.

OPTIONS

-r  Removes the user's existing home directory from the system. The files and directories under the home directory are no longer accessible after successful execution of the command.

-x  Indicates that extended, nonstandard options follow.

    ns=NIS+|NIS|NONE
        Sets name service. The default is to use the name service configured on the host on which the command is run. The precedence is NIS+, NIS, then NONE.
        NIS+
            Updates the NIS+ user tables for the current domain.

        NIS
            Updates the NIS user tables for the current domain.

        NONE
            Updates the local user files in /etc.

serv=server
    Specifies the machine with the user's home directory on it. Necessary when you use the -r option and the home directory resides on a remote machine.

domain=domain|rhost=host
    Specifies domain or remote host. The domain can be specified when the value for the ns parameter is NIS+ or NIS. The domain defaults to the current system domain. The rhost can be specified when the value for the ns parameter is NONE. The rhost defaults to the current system. The rhost parameter can be used to perform the operation on the specified host.

rmmail=Y|N
    Removes mail.

predel=script
    Specifies a script to execute prior to deleting the user. The script must reside in the /opt/SUNWadmd/Scripts directory and must have execute permission.

postdel=script
    Specifies a script to execute after deleting the user. The script must reside in the /opt/SUNWadmd/Scripts directory and must have execute permission. The following environment variables are available to the scripts:

    ADM_OPERATION
        The administrative operation for which this script is being called, in this case it is either PREDEL or POSTDEL.

    ADM_USER_LOGIN_NAME
        The user's login name.

    ADM_USER_UID
        The user ID (UID) of the user.

    ADM_USER_PRIMARY_GROUP
        A group's integer ID or character-string name. It defines the user's primary group member-ship in the system group database.

    ADM_USER_SECONDARY_GROUPS
        The integer IDs or character-string names of one or more existing groups, that define the new user's supplementary group membership in the system group database.

    ADM_USER_SHELL
        Full pathname of the program used as the user's shell on login.

    ADM_USER_SERVER
        The name of the server where the home directory will reside.

    ADM_USER_HOMEPATH
        The path to the user's home directory.

    ADM_USER_FILEMODE
        The permissions on the new home directory.

    ADM_USER_MAILPATH
        The path to the user's mail file.

    ADM_USER_MAIL_SERVER
        The host name of the mail server for this user account.

    ADM_USER_PASSWORD_CATEGORY
        The initial password type for this account.

    ADM_USER_INACTIVE_PERIOD
        The maximum number of days allowed between uses of a login ID before that login ID is declared invalid.

    ADM_USER_ACCOUNT_EXPIRATION
        The expiration date for a login.

    ADM_USER_AUTOMOUNT_HOME
        This indicates whether the user home directory has an entry in /etc/auto_home.

    ADM_USER_NAMESERVICE
        The name service used to perform this operation.

    ADM_USER_NISPLUS_CREDENTIAL
        Whether the user has a NIS+ security entry.

    ADM_USER_SKELETON_PATH
        The path to the directory containing the skeleton files used as templates for the .login, .cshrc and .profile files.

login...
    One or more user names. A string of printable characters that specify one or more existing logins on the system. login cannot contain a colon (:) or a newline (\n).

ENVIRONMENT

See environ(5) for descriptions of the following environment variables that affect the execution of admuserdel: LANG, LC_ALL, LC_CTYPE, and LC_MESSAGES.

ERRORS

The admuserdel command exits with one of the following values:

0   Success.

1   Invalid command syntax. A usage message for the admuserdel command is displayed.

2   An error occurred while executing the command. An exception code and error message are displayed.

RESTRICTIONS
You must be a member of UNIX group 14, the sysadmin group, to execute this command. Also, if ns=NIS+, you must be a member of the NIS+ admin group (See nisgrpadm(1)). Interrupt signal handling is disabled while deleting the user to insure that the system is in a consistent state.

EXAMPLES
The following command deletes the user account of a user named newuser. The -r option removes newuser's home directory. admuserdel -r -x serv=home_server newuser

FILES
/etc/passwd
/etc/shadow
/etc/group
/etc/auto_home
/etc/skel
/opt/SUNWadmd/Scripts

SEE ALSO
admuseradd(1M), admuserls(1M), admusermod(1M)