1 '\" te
   2 .\"  Copyright 1989 AT&T  Copyright (c) 1999,
   3 .\" Sun Microsystems, Inc.  All Rights Reserved
   4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   7 .TH USERDEL 1M "Sep 8, 1999"
   8 .SH NAME
   9 userdel \- delete a user's login from the system
  10 .SH SYNOPSIS
  11 .LP
  12 .nf
  13 \fBuserdel\fR [\fB-r\fR] \fIlogin\fR
  14 .fi
  15 
  16 .SH DESCRIPTION
  17 .sp
  18 .LP
  19 The \fBuserdel\fR utility deletes a user account from the system and makes the
  20 appropriate account-related changes to the system file and file system.
  21 .SH OPTIONS
  22 .sp
  23 .LP
  24 The following options are supported:
  25 .sp
  26 .ne 2
  27 .na
  28 \fB\fB-r\fR\fR
  29 .ad
  30 .RS 6n
  31 Remove the user's home directory from the system. This directory must exist.
  32 The files and directories under the home directory will no longer be accessible
  33 following successful execution of the command.
  34 .RE
  35 
  36 .SH OPERANDS
  37 .sp
  38 .LP
  39 The following operands are supported:
  40 .sp
  41 .ne 2
  42 .na
  43 \fB\fB\fIlogin\fR\fR\fR
  44 .ad
  45 .RS 9n
  46 An existing login name to be deleted.
  47 .RE
  48 
  49 .SH EXIT STATUS
  50 .sp
  51 .LP
  52 The following exit values are returned:
  53 .sp
  54 .ne 2
  55 .na
  56 \fB\fB0\fR\fR
  57 .ad
  58 .RS 6n
  59 Successful completion.
  60 .RE
  61 
  62 .sp
  63 .ne 2
  64 .na
  65 \fB\fB2\fR\fR
  66 .ad
  67 .RS 6n
  68 Invalid command syntax. A usage message for the \fBuserdel\fR command is
  69 displayed.
  70 .RE
  71 
  72 .sp
  73 .ne 2
  74 .na
  75 \fB\fB6\fR\fR
  76 .ad
  77 .RS 6n
  78 The account to be removed does not exist.
  79 .RE
  80 
  81 .sp
  82 .ne 2
  83 .na
  84 \fB\fB8\fR\fR
  85 .ad
  86 .RS 6n
  87 The account to be removed is in use.
  88 .RE
  89 
  90 .sp
  91 .ne 2
  92 .na
  93 \fB\fB10\fR\fR
  94 .ad
  95 .RS 6n
  96 Cannot update the \fB/etc/group\fR or \fB/etc/user_attr\fR file but the login
  97 is removed from the \fB/etc/passwd\fR file.
  98 .RE
  99 
 100 .sp
 101 .ne 2
 102 .na
 103 \fB\fB12\fR\fR
 104 .ad
 105 .RS 6n
 106 Cannot remove or otherwise modify the home directory.
 107 .RE
 108 
 109 .SH FILES
 110 .sp
 111 .ne 2
 112 .na
 113 \fB\fB/etc/passwd\fR\fR
 114 .ad
 115 .RS 18n
 116 system password file
 117 .RE
 118 
 119 .sp
 120 .ne 2
 121 .na
 122 \fB\fB/etc/shadow\fR\fR
 123 .ad
 124 .RS 18n
 125 system file contain users' encrypted passwords and related information
 126 .RE
 127 
 128 .sp
 129 .ne 2
 130 .na
 131 \fB\fB/etc/group\fR\fR
 132 .ad
 133 .RS 18n
 134 system file containing group definitions
 135 .RE
 136 
 137 .sp
 138 .ne 2
 139 .na
 140 \fB\fB/etc/user_attr\fR\fR
 141 .ad
 142 .RS 18n
 143 system file containing additional user attributes
 144 .RE
 145 
 146 .SH SEE ALSO
 147 .sp
 148 .LP
 149 \fBauths\fR(1), \fBpasswd\fR(1), \fBprofiles\fR(1), \fBroles\fR(1),
 150 \fBusers\fR(1B), \fBgroupadd\fR(1M), \fBgroupdel\fR(1M), \fBgroupmod\fR(1M),
 151 \fBlogins\fR(1M), \fBroleadd\fR(1M), \fBrolemod\fR(1M), \fBuseradd\fR(1M),
 152 \fBuserdel\fR(1M), \fBusermod\fR(1M), \fBpasswd\fR(4), \fBprof_attr\fR(4),
 153 \fBuser_attr\fR(4), \fBattributes\fR(5)
 154 .SH NOTES
 155 .sp
 156 .LP
 157 The \fBuserdel\fR utility only deletes an account definition that is in the
 158 local \fB/etc/group\fR, \fB/etc/passwd\fR, \fB/etc/shadow\fR, and
 159 \fB/etc/user_attr\fR file. file. If a network name service such as \fBNIS\fR or
 160 \fBNIS+\fR is being used to supplement the local \fB/etc/passwd\fR file with
 161 additional entries, \fBuserdel\fR cannot change information supplied by the
 162 network name service.