1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23*0Sstevel@tonic-gate /*	  All Rights Reserved  	*/
24*0Sstevel@tonic-gate 
25*0Sstevel@tonic-gate 
26*0Sstevel@tonic-gate /*
27*0Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
28*0Sstevel@tonic-gate  * Use is subject to license terms.
29*0Sstevel@tonic-gate  */
30*0Sstevel@tonic-gate 
31*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.6 */
32*0Sstevel@tonic-gate 
33*0Sstevel@tonic-gate char *errmsgs[] = {
34*0Sstevel@tonic-gate 	"WARNING: uid %ld is reserved.\n",
35*0Sstevel@tonic-gate 	"WARNING: more than NGROUPS_MAX(%d) groups specified.\n",
36*0Sstevel@tonic-gate 	"ERROR: invalid syntax.\n"
37*0Sstevel@tonic-gate 	    "usage:  useradd [-u uid [-o] | -g group | -G group[[,group]...] |"
38*0Sstevel@tonic-gate 	    "-d dir |\n"
39*0Sstevel@tonic-gate 	    "\t\t-s shell | -c comment | -m [-k skel_dir] | -f inactive |\n"
40*0Sstevel@tonic-gate 	    "\t\t-e expire | -A authorization [, authorization ...] |\n"
41*0Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] |\n"
42*0Sstevel@tonic-gate 	    "\t\t-K key=value | -p project [, project ...]] login\n"
43*0Sstevel@tonic-gate 	    "\tuseradd -D [-g group | -b base_dir | -f inactive | -e expire\n"
44*0Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] |\n"
45*0Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] |\n"
46*0Sstevel@tonic-gate 	    "\t\t-K key=value ... -p project]\n",
47*0Sstevel@tonic-gate 	"ERROR: Invalid syntax.\nusage:  userdel [-r] login\n",
48*0Sstevel@tonic-gate 	"ERROR: Invalid syntax.\n"
49*0Sstevel@tonic-gate 	    "usage:  usermod -u uid [-o] | -g group | -G group[[,group]...] |\n"
50*0Sstevel@tonic-gate 	    "\t\t-d dir [-m] | -s shell | -c comment |\n"
51*0Sstevel@tonic-gate 	    "\t\t-l new_logname | -f inactive | -e expire |\n"
52*0Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] | -K key=value ... |\n"
53*0Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] login\n",
54*0Sstevel@tonic-gate 	"ERROR: Unexpected failure.  Defaults unchanged.\n",
55*0Sstevel@tonic-gate 	"ERROR: Unable to remove files from home directory.\n",
56*0Sstevel@tonic-gate 	"ERROR: Unable to remove home directory.\n",
57*0Sstevel@tonic-gate 	"ERROR: Cannot update system files - login cannot be %s.\n",
58*0Sstevel@tonic-gate 	"ERROR: uid %ld is already in use.  Choose another.\n",
59*0Sstevel@tonic-gate 	"ERROR: %s is already in use.  Choose another.\n",
60*0Sstevel@tonic-gate 	"ERROR: %s does not exist.\n",
61*0Sstevel@tonic-gate 	"ERROR: %s is not a valid %s.  Choose another.\n",
62*0Sstevel@tonic-gate 	"ERROR: %s is in use.  Cannot %s it.\n",
63*0Sstevel@tonic-gate 	"WARNING: %s has no permissions to use %s.\n",
64*0Sstevel@tonic-gate 	"ERROR: There is not sufficient space to move %s home directory to %s"
65*0Sstevel@tonic-gate 	    "\n",
66*0Sstevel@tonic-gate 	"ERROR: %s %ld is too big.  Choose another.\n",
67*0Sstevel@tonic-gate 	"ERROR: group %s does not exist.  Choose another.\n",
68*0Sstevel@tonic-gate 	"ERROR: Unable to %s: %s.\n",
69*0Sstevel@tonic-gate 	"ERROR: %s is not a full path name.  Choose another.\n",
70*0Sstevel@tonic-gate 	"ERROR: %s is the primary group name.  Choose another.\n",
71*0Sstevel@tonic-gate 	"ERROR: Inconsistent password files.  See pwconv(1M).\n",
72*0Sstevel@tonic-gate 	"ERROR: %s is not a local user.\n",
73*0Sstevel@tonic-gate 	"ERROR: Permission denied.\n",
74*0Sstevel@tonic-gate 	"WARNING: Group entry exceeds 2048 char: /etc/group entry truncated.\n",
75*0Sstevel@tonic-gate 	"ERROR: invalid syntax.\n"
76*0Sstevel@tonic-gate 	    "usage:  roleadd [-u uid [-o] | -g group | -G group[[,group]...] |"
77*0Sstevel@tonic-gate 	    "-d dir |\n"
78*0Sstevel@tonic-gate 	    "\t\t-s shell | -c comment | -m [-k skel_dir] | -f inactive |\n"
79*0Sstevel@tonic-gate 	    "\t\t-e expire | -A authorization [, authorization ...] |\n"
80*0Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -K key=value ] login\n"
81*0Sstevel@tonic-gate 	    "\troleadd -D [-g group | -b base_dir | -f inactive | -e expire\n"
82*0Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] |\n"
83*0Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...]]\n",
84*0Sstevel@tonic-gate 	"ERROR: Invalid syntax.\nusage:  roledel [-r] login\n",
85*0Sstevel@tonic-gate 	"ERROR: Invalid syntax.\n"
86*0Sstevel@tonic-gate 	    "usage:  rolemod -u uid [-o] | -g group | -G group[[,group]...] |\n"
87*0Sstevel@tonic-gate 	    "\t\t-d dir [-m] | -s shell | -c comment |\n"
88*0Sstevel@tonic-gate 	    "\t\t-l new_logname | -f inactive | -e expire |\n"
89*0Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] | -K key=value |\n"
90*0Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] login\n",
91*0Sstevel@tonic-gate 	"ERROR: project %s does not exist.  Choose another.\n",
92*0Sstevel@tonic-gate 	"WARNING: more than NPROJECTS_MAX(%d) projects specified.\n",
93*0Sstevel@tonic-gate 	"WARNING: Project entry exceeds %d char: /etc/project entry truncated."
94*0Sstevel@tonic-gate 	    "\n",
95*0Sstevel@tonic-gate 	"ERROR: Invalid key.\n",
96*0Sstevel@tonic-gate 	"ERROR: Missing value specification.\n",
97*0Sstevel@tonic-gate 	"ERROR: Multiple definitions of key ``%s''.\n",
98*0Sstevel@tonic-gate 	"ERROR: Roles most be modified with ``rolemod''.\n",
99*0Sstevel@tonic-gate 	"ERROR: Users most be modified with ``usermod''.\n",
100*0Sstevel@tonic-gate 	"WARNING: gid %ld is reserved.\n",
101*0Sstevel@tonic-gate 	"ERROR: Failed to read /etc/group file due to invaild entry or"
102*0Sstevel@tonic-gate 	    " read error.\n",
103*0Sstevel@tonic-gate };
104*0Sstevel@tonic-gate 
105*0Sstevel@tonic-gate int lasterrmsg = sizeof (errmsgs) / sizeof (char *);
106