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 5*0523b0a4Sbasabi * Common Development and Distribution License (the "License"). 6*0523b0a4Sbasabi * 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 /* 26*0523b0a4Sbasabi * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 277c478bd9Sstevel@tonic-gate * Use is subject to license terms. 287c478bd9Sstevel@tonic-gate */ 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6 */ 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]...] |" 37*0523b0a4Sbasabi "-d dir | -b base_dir |\n" 387c478bd9Sstevel@tonic-gate "\t\t-s shell | -c comment | -m [-k skel_dir] | -f inactive |\n" 397c478bd9Sstevel@tonic-gate "\t\t-e expire | -A authorization [, authorization ...] |\n" 407c478bd9Sstevel@tonic-gate "\t\t-P profile [, profile ...] | -R role [, role ...] |\n" 417c478bd9Sstevel@tonic-gate "\t\t-K key=value | -p project [, project ...]] login\n" 427c478bd9Sstevel@tonic-gate "\tuseradd -D [-g group | -b base_dir | -f inactive | -e expire\n" 437c478bd9Sstevel@tonic-gate "\t\t-A authorization [, authorization ...] |\n" 447c478bd9Sstevel@tonic-gate "\t\t-P profile [, profile ...] | -R role [, role ...] |\n" 45*0523b0a4Sbasabi "\t\t-K key=value ... -p project] | [-s shell] | [-k skel_dir]\n", 467c478bd9Sstevel@tonic-gate "ERROR: Invalid syntax.\nusage: userdel [-r] login\n", 477c478bd9Sstevel@tonic-gate "ERROR: Invalid syntax.\n" 487c478bd9Sstevel@tonic-gate "usage: usermod -u uid [-o] | -g group | -G group[[,group]...] |\n" 497c478bd9Sstevel@tonic-gate "\t\t-d dir [-m] | -s shell | -c comment |\n" 507c478bd9Sstevel@tonic-gate "\t\t-l new_logname | -f inactive | -e expire |\n" 517c478bd9Sstevel@tonic-gate "\t\t-A authorization [, authorization ...] | -K key=value ... |\n" 527c478bd9Sstevel@tonic-gate "\t\t-P profile [, profile ...] | -R role [, role ...] login\n", 537c478bd9Sstevel@tonic-gate "ERROR: Unexpected failure. Defaults unchanged.\n", 547c478bd9Sstevel@tonic-gate "ERROR: Unable to remove files from home directory.\n", 557c478bd9Sstevel@tonic-gate "ERROR: Unable to remove home directory.\n", 567c478bd9Sstevel@tonic-gate "ERROR: Cannot update system files - login cannot be %s.\n", 577c478bd9Sstevel@tonic-gate "ERROR: uid %ld is already in use. Choose another.\n", 587c478bd9Sstevel@tonic-gate "ERROR: %s is already in use. Choose another.\n", 597c478bd9Sstevel@tonic-gate "ERROR: %s does not exist.\n", 607c478bd9Sstevel@tonic-gate "ERROR: %s is not a valid %s. Choose another.\n", 617c478bd9Sstevel@tonic-gate "ERROR: %s is in use. Cannot %s it.\n", 627c478bd9Sstevel@tonic-gate "WARNING: %s has no permissions to use %s.\n", 637c478bd9Sstevel@tonic-gate "ERROR: There is not sufficient space to move %s home directory to %s" 647c478bd9Sstevel@tonic-gate "\n", 657c478bd9Sstevel@tonic-gate "ERROR: %s %ld is too big. Choose another.\n", 667c478bd9Sstevel@tonic-gate "ERROR: group %s does not exist. Choose another.\n", 677c478bd9Sstevel@tonic-gate "ERROR: Unable to %s: %s.\n", 687c478bd9Sstevel@tonic-gate "ERROR: %s is not a full path name. Choose another.\n", 697c478bd9Sstevel@tonic-gate "ERROR: %s is the primary group name. Choose another.\n", 707c478bd9Sstevel@tonic-gate "ERROR: Inconsistent password files. See pwconv(1M).\n", 717c478bd9Sstevel@tonic-gate "ERROR: %s is not a local user.\n", 727c478bd9Sstevel@tonic-gate "ERROR: Permission denied.\n", 737c478bd9Sstevel@tonic-gate "WARNING: Group entry exceeds 2048 char: /etc/group entry truncated.\n", 747c478bd9Sstevel@tonic-gate "ERROR: invalid syntax.\n" 757c478bd9Sstevel@tonic-gate "usage: roleadd [-u uid [-o] | -g group | -G group[[,group]...] |" 767c478bd9Sstevel@tonic-gate "-d dir |\n" 777c478bd9Sstevel@tonic-gate "\t\t-s shell | -c comment | -m [-k skel_dir] | -f inactive |\n" 787c478bd9Sstevel@tonic-gate "\t\t-e expire | -A authorization [, authorization ...] |\n" 797c478bd9Sstevel@tonic-gate "\t\t-P profile [, profile ...] | -K key=value ] login\n" 807c478bd9Sstevel@tonic-gate "\troleadd -D [-g group | -b base_dir | -f inactive | -e expire\n" 817c478bd9Sstevel@tonic-gate "\t\t-A authorization [, authorization ...] |\n" 827c478bd9Sstevel@tonic-gate "\t\t-P profile [, profile ...]]\n", 837c478bd9Sstevel@tonic-gate "ERROR: Invalid syntax.\nusage: roledel [-r] login\n", 847c478bd9Sstevel@tonic-gate "ERROR: Invalid syntax.\n" 857c478bd9Sstevel@tonic-gate "usage: rolemod -u uid [-o] | -g group | -G group[[,group]...] |\n" 867c478bd9Sstevel@tonic-gate "\t\t-d dir [-m] | -s shell | -c comment |\n" 877c478bd9Sstevel@tonic-gate "\t\t-l new_logname | -f inactive | -e expire |\n" 887c478bd9Sstevel@tonic-gate "\t\t-A authorization [, authorization ...] | -K key=value |\n" 897c478bd9Sstevel@tonic-gate "\t\t-P profile [, profile ...] login\n", 907c478bd9Sstevel@tonic-gate "ERROR: project %s does not exist. Choose another.\n", 917c478bd9Sstevel@tonic-gate "WARNING: more than NPROJECTS_MAX(%d) projects specified.\n", 927c478bd9Sstevel@tonic-gate "WARNING: Project entry exceeds %d char: /etc/project entry truncated." 937c478bd9Sstevel@tonic-gate "\n", 947c478bd9Sstevel@tonic-gate "ERROR: Invalid key.\n", 957c478bd9Sstevel@tonic-gate "ERROR: Missing value specification.\n", 967c478bd9Sstevel@tonic-gate "ERROR: Multiple definitions of key ``%s''.\n", 97*0523b0a4Sbasabi "ERROR: Roles must be modified with ``rolemod''.\n", 98*0523b0a4Sbasabi "ERROR: Users must be modified with ``usermod''.\n", 997c478bd9Sstevel@tonic-gate "WARNING: gid %ld is reserved.\n", 100*0523b0a4Sbasabi "ERROR: Failed to read /etc/group file due to invalid entry or" 1017c478bd9Sstevel@tonic-gate " read error.\n", 1027c478bd9Sstevel@tonic-gate }; 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate int lasterrmsg = sizeof (errmsgs) / sizeof (char *); 105