4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
41 * The definitions in this file are local to the OA&M subsystem. General
42 * use is not encouraged.
45 /* User/group default values */
46 #define DEFGID 99 /* max reserved group id */
49 #define DEFPROJNAME "default"
51 #define DEFGNAME "other"
52 #define DEFPARENT "/home"
53 #define DEFSKL "/etc/skel"
54 #define DEFSHL "/bin/sh"
55 #define DEFROLESHL "/bin/pfsh"
60 #define DEFROLEPROF "All"
63 #define DEFDFLTPRIV ""
64 #define DEFLOCK_AFTER_RETRIES ""
66 /* Defaults file keywords */
67 #define RIDSTR "defrid="
68 #define GIDSTR "defgroup="
69 #define GNAMSTR "defgname="
70 #define PARSTR "defparent="
71 #define SKLSTR "defskel="
72 #define SHELLSTR "defshell="
73 #define INACTSTR "definact="
74 #define EXPIRESTR "defexpire="
75 #define AUTHSTR "defauthorization="
76 #define PROFSTR "defprofile="
77 #define ROLESTR "defrole="
78 #define PROJSTR "defproj="
79 #define PROJNMSTR "defprojname="
80 #define LIMPRSTR "deflimitpriv="
81 #define DFLTPRSTR "defdefaultpriv="
82 #define FHEADER "# Default values for useradd. Changed "
83 #define FHEADER_ROLE "# Default values for roleadd. Changed "
84 #define LOCK_AFTER_RETRIESSTR "deflock_after_retries="
86 #define GROUP "/etc/group"
89 #define MAXGLEN 9 /* max length of group name */
90 #define MAXDLEN 80 /* max length of a date string */
92 /* defaults structure */
94 int defrid
; /* highest reserved uid */
95 int defgroup
; /* default group id */
96 char *defgname
; /* default group name */
97 char *defparent
; /* default base directory for new logins */
98 char *defskel
; /* default skel directory */
99 char *defshell
; /* default shell */
100 int definact
; /* default inactive */
101 char *defexpire
; /* default expire date */
102 char *defauth
; /* default authorization */
103 char *defprof
; /* default profile */
104 char *defrole
; /* default role */
105 projid_t defproj
; /* default project id */
106 char *defprojname
; /* default project name */
107 char *deflimpriv
; /* default limitpriv */
108 char *defdfltpriv
; /* default defaultpriv */
109 char *deflock_after_retries
; /* default lock_after_retries */
113 /* exit() values for user/group commands */
115 /* Everything succeeded */
121 /* Command syntax error */
124 /* Invalid argument given */
127 /* A gid or uid already exists */
128 #define EX_ID_EXISTS 4
130 /* PASSWD and SHADOW are inconsistent with each other */
131 #define EX_INCONSISTENT 5
133 /* A group or user name doesn't exist */
134 #define EX_NAME_NOT_EXIST 6
136 /* GROUP, PASSWD, or SHADOW file missing */
139 /* GROUP, PASSWD, or SHAWOW file is busy */
142 /* A group or user name already exists */
143 #define EX_NAME_EXISTS 9
145 /* Unable to update GROUP, PASSWD, or SHADOW file */
148 /* Not enough space */
149 #define EX_NOSPACE 11
151 /* Unable to create/remove/move home directory */
152 #define EX_HOMEDIR 12
154 /* new login already in use */
155 #define EX_NL_USED 13
157 /* Unexpected failure */
158 #define EX_FAILURE 14
160 /* A user name is in a non-local name service */
161 #define EX_NOT_LOCAL 15
167 #endif /* _USERDEFS_H */