xref: /onnv-gate/usr/src/cmd/oamuser/user/messages.c (revision 1639:4ece4f941e66)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*1639Sbasabi  * Common Development and Distribution License (the "License").
6*1639Sbasabi  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
220Sstevel@tonic-gate /*	  All Rights Reserved  	*/
230Sstevel@tonic-gate 
240Sstevel@tonic-gate 
250Sstevel@tonic-gate /*
26*1639Sbasabi  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
270Sstevel@tonic-gate  * Use is subject to license terms.
280Sstevel@tonic-gate  */
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 1.6 */
310Sstevel@tonic-gate 
320Sstevel@tonic-gate char *errmsgs[] = {
330Sstevel@tonic-gate 	"WARNING: uid %ld is reserved.\n",
340Sstevel@tonic-gate 	"WARNING: more than NGROUPS_MAX(%d) groups specified.\n",
350Sstevel@tonic-gate 	"ERROR: invalid syntax.\n"
360Sstevel@tonic-gate 	    "usage:  useradd [-u uid [-o] | -g group | -G group[[,group]...] |"
37*1639Sbasabi 	    "-d dir | -b base_dir |\n"
380Sstevel@tonic-gate 	    "\t\t-s shell | -c comment | -m [-k skel_dir] | -f inactive |\n"
390Sstevel@tonic-gate 	    "\t\t-e expire | -A authorization [, authorization ...] |\n"
400Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] |\n"
410Sstevel@tonic-gate 	    "\t\t-K key=value | -p project [, project ...]] login\n"
420Sstevel@tonic-gate 	    "\tuseradd -D [-g group | -b base_dir | -f inactive | -e expire\n"
430Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] |\n"
440Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] |\n"
45*1639Sbasabi 	    "\t\t-K key=value ... -p project] | [-s shell] | [-k skel_dir]\n",
460Sstevel@tonic-gate 	"ERROR: Invalid syntax.\nusage:  userdel [-r] login\n",
470Sstevel@tonic-gate 	"ERROR: Invalid syntax.\n"
480Sstevel@tonic-gate 	    "usage:  usermod -u uid [-o] | -g group | -G group[[,group]...] |\n"
490Sstevel@tonic-gate 	    "\t\t-d dir [-m] | -s shell | -c comment |\n"
500Sstevel@tonic-gate 	    "\t\t-l new_logname | -f inactive | -e expire |\n"
510Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] | -K key=value ... |\n"
520Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] login\n",
530Sstevel@tonic-gate 	"ERROR: Unexpected failure.  Defaults unchanged.\n",
540Sstevel@tonic-gate 	"ERROR: Unable to remove files from home directory.\n",
550Sstevel@tonic-gate 	"ERROR: Unable to remove home directory.\n",
560Sstevel@tonic-gate 	"ERROR: Cannot update system files - login cannot be %s.\n",
570Sstevel@tonic-gate 	"ERROR: uid %ld is already in use.  Choose another.\n",
580Sstevel@tonic-gate 	"ERROR: %s is already in use.  Choose another.\n",
590Sstevel@tonic-gate 	"ERROR: %s does not exist.\n",
600Sstevel@tonic-gate 	"ERROR: %s is not a valid %s.  Choose another.\n",
610Sstevel@tonic-gate 	"ERROR: %s is in use.  Cannot %s it.\n",
620Sstevel@tonic-gate 	"WARNING: %s has no permissions to use %s.\n",
630Sstevel@tonic-gate 	"ERROR: There is not sufficient space to move %s home directory to %s"
640Sstevel@tonic-gate 	    "\n",
650Sstevel@tonic-gate 	"ERROR: %s %ld is too big.  Choose another.\n",
660Sstevel@tonic-gate 	"ERROR: group %s does not exist.  Choose another.\n",
670Sstevel@tonic-gate 	"ERROR: Unable to %s: %s.\n",
680Sstevel@tonic-gate 	"ERROR: %s is not a full path name.  Choose another.\n",
690Sstevel@tonic-gate 	"ERROR: %s is the primary group name.  Choose another.\n",
700Sstevel@tonic-gate 	"ERROR: Inconsistent password files.  See pwconv(1M).\n",
710Sstevel@tonic-gate 	"ERROR: %s is not a local user.\n",
720Sstevel@tonic-gate 	"ERROR: Permission denied.\n",
730Sstevel@tonic-gate 	"WARNING: Group entry exceeds 2048 char: /etc/group entry truncated.\n",
740Sstevel@tonic-gate 	"ERROR: invalid syntax.\n"
750Sstevel@tonic-gate 	    "usage:  roleadd [-u uid [-o] | -g group | -G group[[,group]...] |"
760Sstevel@tonic-gate 	    "-d dir |\n"
770Sstevel@tonic-gate 	    "\t\t-s shell | -c comment | -m [-k skel_dir] | -f inactive |\n"
780Sstevel@tonic-gate 	    "\t\t-e expire | -A authorization [, authorization ...] |\n"
790Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -K key=value ] login\n"
800Sstevel@tonic-gate 	    "\troleadd -D [-g group | -b base_dir | -f inactive | -e expire\n"
810Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] |\n"
820Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...]]\n",
830Sstevel@tonic-gate 	"ERROR: Invalid syntax.\nusage:  roledel [-r] login\n",
840Sstevel@tonic-gate 	"ERROR: Invalid syntax.\n"
850Sstevel@tonic-gate 	    "usage:  rolemod -u uid [-o] | -g group | -G group[[,group]...] |\n"
860Sstevel@tonic-gate 	    "\t\t-d dir [-m] | -s shell | -c comment |\n"
870Sstevel@tonic-gate 	    "\t\t-l new_logname | -f inactive | -e expire |\n"
880Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] | -K key=value |\n"
890Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] login\n",
900Sstevel@tonic-gate 	"ERROR: project %s does not exist.  Choose another.\n",
910Sstevel@tonic-gate 	"WARNING: more than NPROJECTS_MAX(%d) projects specified.\n",
920Sstevel@tonic-gate 	"WARNING: Project entry exceeds %d char: /etc/project entry truncated."
930Sstevel@tonic-gate 	    "\n",
940Sstevel@tonic-gate 	"ERROR: Invalid key.\n",
950Sstevel@tonic-gate 	"ERROR: Missing value specification.\n",
960Sstevel@tonic-gate 	"ERROR: Multiple definitions of key ``%s''.\n",
97*1639Sbasabi 	"ERROR: Roles must be modified with ``rolemod''.\n",
98*1639Sbasabi 	"ERROR: Users must be modified with ``usermod''.\n",
990Sstevel@tonic-gate 	"WARNING: gid %ld is reserved.\n",
100*1639Sbasabi 	"ERROR: Failed to read /etc/group file due to invalid entry or"
1010Sstevel@tonic-gate 	    " read error.\n",
1020Sstevel@tonic-gate };
1030Sstevel@tonic-gate 
1040Sstevel@tonic-gate int lasterrmsg = sizeof (errmsgs) / sizeof (char *);
105