1 USERDEL(1M)                  Maintenance Commands                  USERDEL(1M)
   2 
   3 
   4 
   5 NAME
   6        userdel - delete a user's login from the system
   7 
   8 SYNOPSIS
   9        userdel [-r [-z|-Z]] login
  10 
  11 
  12 DESCRIPTION
  13        The userdel utility deletes a user account from the system and makes
  14        the appropriate account-related changes to the system file and file
  15        system.
  16 
  17 OPTIONS
  18        The following options are supported:
  19 
  20        -r [-z|-Z]
  21              Remove the user's home directory from the system. This directory
  22              must exist.  The files and directories under the home directory
  23              will no longer be accessible following successful execution of
  24              the command.  CHANGE_ZFS_FS option in /etc/default/useradd file
  25              determines if ZFS filesystem underlying user home directory will
  26              be destroyed. If user's home directory is a ZFS file system and
  27              CHANGE_ZFS_FS option is set to yes, the filesystem will be
  28              destroyed. -z and -Z options allow overwrite default behavior.
  29              If -z option is specified, userdel tries to destroy file system.
  30              If -Z option is specified, file system is not destroyed.
  31 
  32 
  33 OPERANDS
  34        The following operands are supported:
  35 
  36        login
  37                 An existing login name to be deleted.
  38 
  39 
  40 EXIT STATUS
  41        The following exit values are returned:
  42 
  43        0
  44              Successful completion.
  45 
  46 
  47        2
  48              Invalid command syntax. A usage message for the userdel command
  49              is displayed.
  50 
  51 
  52        6
  53              The account to be removed does not exist.
  54 
  55 
  56        8
  57              The account to be removed is in use.
  58 
  59 
  60        10
  61              Cannot update the /etc/group or /etc/user_attr file but the login
  62              is removed from the /etc/passwd file.
  63 
  64 
  65        12
  66              Cannot remove or otherwise modify the home directory.
  67 
  68 
  69 FILES
  70        /etc/default/useradd
  71                          useradd, usermod and userdel configuration file
  72 
  73 
  74        /etc/passwd
  75                          system password file
  76 
  77 
  78        /etc/shadow
  79                          system file contain users' encrypted passwords and
  80                          related information
  81 
  82 
  83        /etc/group
  84                          system file containing group definitions
  85 
  86 
  87        /etc/user_attr
  88                          system file containing additional user attributes
  89 
  90 
  91 SEE ALSO
  92        auths(1), passwd(1), profiles(1), roles(1), users(1B), groupadd(1M),
  93        groupdel(1M), groupmod(1M), logins(1M), roleadd(1M), rolemod(1M),
  94        useradd(1M), userdel(1M), usermod(1M), passwd(4), prof_attr(4),
  95        user_attr(4), attributes(5)
  96 
  97 NOTES
  98        The userdel utility only deletes an account definition that is in the
  99        local /etc/group, /etc/passwd, /etc/shadow, and /etc/user_attr file.
 100        file. If a network name service such as NIS or NIS+ is being used to
 101        supplement the local /etc/passwd file with additional entries, userdel
 102        cannot change information supplied by the network name service.
 103 
 104 
 105 
 106                                September 8, 1999                   USERDEL(1M)