xref: /illumos-gate/usr/src/cmd/oamuser/user/messages.c (revision bbf21555)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
50523b0a4Sbasabi  * Common Development and Distribution License (the "License").
60523b0a4Sbasabi  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
227c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate /*
260a1278f2SGary Mills  * Copyright (c) 2013 Gary Mills
270a1278f2SGary Mills  *
280523b0a4Sbasabi  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
297c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
307c478bd9Sstevel@tonic-gate  */
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate char *errmsgs[] = {
337c478bd9Sstevel@tonic-gate 	"WARNING: uid %ld is reserved.\n",
347c478bd9Sstevel@tonic-gate 	"WARNING: more than NGROUPS_MAX(%d) groups specified.\n",
357c478bd9Sstevel@tonic-gate 	"ERROR: invalid syntax.\n"
367c478bd9Sstevel@tonic-gate 	    "usage:  useradd [-u uid [-o] | -g group | -G group[[,group]...] |"
370523b0a4Sbasabi 	    "-d dir | -b base_dir |\n"
387fc68ddfSAlbert Lee 	    "\t\t-s shell | -c comment | -m [-z|Z] [-k skel_dir] |"
397fc68ddfSAlbert Lee 	    "-f inactive |\n"
407c478bd9Sstevel@tonic-gate 	    "\t\t-e expire | -A authorization [, authorization ...] |\n"
417c478bd9Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] |\n"
427c478bd9Sstevel@tonic-gate 	    "\t\t-K key=value | -p project [, project ...]] login\n"
437c478bd9Sstevel@tonic-gate 	    "\tuseradd -D [-g group | -b base_dir | -f inactive | -e expire\n"
447c478bd9Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] |\n"
457c478bd9Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] |\n"
460523b0a4Sbasabi 	    "\t\t-K key=value ... -p project] | [-s shell] | [-k skel_dir]\n",
477c478bd9Sstevel@tonic-gate 	"ERROR: Invalid syntax.\nusage:  userdel [-r] login\n",
487c478bd9Sstevel@tonic-gate 	"ERROR: Invalid syntax.\n"
497c478bd9Sstevel@tonic-gate 	    "usage:  usermod -u uid [-o] | -g group | -G group[[,group]...] |\n"
507fc68ddfSAlbert Lee 	    "\t\t-d dir [-m [-z|Z]] | -s shell | -c comment |\n"
517c478bd9Sstevel@tonic-gate 	    "\t\t-l new_logname | -f inactive | -e expire |\n"
527c478bd9Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] | -K key=value ... |\n"
537c478bd9Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -R role [, role ...] login\n",
547c478bd9Sstevel@tonic-gate 	"ERROR: Unexpected failure.  Defaults unchanged.\n",
557c478bd9Sstevel@tonic-gate 	"ERROR: Unable to remove files from home directory.\n",
567c478bd9Sstevel@tonic-gate 	"ERROR: Unable to remove home directory.\n",
577c478bd9Sstevel@tonic-gate 	"ERROR: Cannot update system files - login cannot be %s.\n",
587c478bd9Sstevel@tonic-gate 	"ERROR: uid %ld is already in use.  Choose another.\n",
597c478bd9Sstevel@tonic-gate 	"ERROR: %s is already in use.  Choose another.\n",
607c478bd9Sstevel@tonic-gate 	"ERROR: %s does not exist.\n",
617c478bd9Sstevel@tonic-gate 	"ERROR: %s is not a valid %s.  Choose another.\n",
627c478bd9Sstevel@tonic-gate 	"ERROR: %s is in use.  Cannot %s it.\n",
637c478bd9Sstevel@tonic-gate 	"WARNING: %s has no permissions to use %s.\n",
647c478bd9Sstevel@tonic-gate 	"ERROR: There is not sufficient space to move %s home directory to %s"
657c478bd9Sstevel@tonic-gate 	    "\n",
667c478bd9Sstevel@tonic-gate 	"ERROR: %s %ld is too big.  Choose another.\n",
677c478bd9Sstevel@tonic-gate 	"ERROR: group %s does not exist.  Choose another.\n",
687c478bd9Sstevel@tonic-gate 	"ERROR: Unable to %s: %s.\n",
697c478bd9Sstevel@tonic-gate 	"ERROR: %s is not a full path name.  Choose another.\n",
707c478bd9Sstevel@tonic-gate 	"ERROR: %s is the primary group name.  Choose another.\n",
71*bbf21555SRichard Lowe 	"ERROR: Inconsistent password files.  See pwconv(8).\n",
727c478bd9Sstevel@tonic-gate 	"ERROR: %s is not a local user.\n",
737c478bd9Sstevel@tonic-gate 	"ERROR: Permission denied.\n",
747c478bd9Sstevel@tonic-gate 	"WARNING: Group entry exceeds 2048 char: /etc/group entry truncated.\n",
757c478bd9Sstevel@tonic-gate 	"ERROR: invalid syntax.\n"
767c478bd9Sstevel@tonic-gate 	    "usage:  roleadd [-u uid [-o] | -g group | -G group[[,group]...] |"
777c478bd9Sstevel@tonic-gate 	    "-d dir |\n"
787c478bd9Sstevel@tonic-gate 	    "\t\t-s shell | -c comment | -m [-k skel_dir] | -f inactive |\n"
797c478bd9Sstevel@tonic-gate 	    "\t\t-e expire | -A authorization [, authorization ...] |\n"
807c478bd9Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] | -K key=value ] login\n"
817c478bd9Sstevel@tonic-gate 	    "\troleadd -D [-g group | -b base_dir | -f inactive | -e expire\n"
827c478bd9Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] |\n"
837c478bd9Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...]]\n",
847c478bd9Sstevel@tonic-gate 	"ERROR: Invalid syntax.\nusage:  roledel [-r] login\n",
857c478bd9Sstevel@tonic-gate 	"ERROR: Invalid syntax.\n"
867c478bd9Sstevel@tonic-gate 	    "usage:  rolemod -u uid [-o] | -g group | -G group[[,group]...] |\n"
877c478bd9Sstevel@tonic-gate 	    "\t\t-d dir [-m] | -s shell | -c comment |\n"
887c478bd9Sstevel@tonic-gate 	    "\t\t-l new_logname | -f inactive | -e expire |\n"
897c478bd9Sstevel@tonic-gate 	    "\t\t-A authorization [, authorization ...] | -K key=value |\n"
907c478bd9Sstevel@tonic-gate 	    "\t\t-P profile [, profile ...] login\n",
917c478bd9Sstevel@tonic-gate 	"ERROR: project %s does not exist.  Choose another.\n",
927c478bd9Sstevel@tonic-gate 	"WARNING: more than NPROJECTS_MAX(%d) projects specified.\n",
937c478bd9Sstevel@tonic-gate 	"WARNING: Project entry exceeds %d char: /etc/project entry truncated."
947c478bd9Sstevel@tonic-gate 	    "\n",
957c478bd9Sstevel@tonic-gate 	"ERROR: Invalid key.\n",
967c478bd9Sstevel@tonic-gate 	"ERROR: Missing value specification.\n",
977c478bd9Sstevel@tonic-gate 	"ERROR: Multiple definitions of key ``%s''.\n",
980523b0a4Sbasabi 	"ERROR: Roles must be modified with ``rolemod''.\n",
990523b0a4Sbasabi 	"ERROR: Users must be modified with ``usermod''.\n",
1007c478bd9Sstevel@tonic-gate 	"WARNING: gid %ld is reserved.\n",
1010523b0a4Sbasabi 	"ERROR: Failed to read /etc/group file due to invalid entry or"
1027c478bd9Sstevel@tonic-gate 	    " read error.\n",
1030a1278f2SGary Mills 	"ERROR: %s is too long.  Choose another.\n",
1047fc68ddfSAlbert Lee 	"WARNING: Avoided creating ZFS filesystem as parent directory %s is not"
1057fc68ddfSAlbert Lee 	    " a ZFS mount point.\n",
1067c478bd9Sstevel@tonic-gate };
1077c478bd9Sstevel@tonic-gate 
1087c478bd9Sstevel@tonic-gate int lasterrmsg = sizeof (errmsgs) / sizeof (char *);
109