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