Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man8 / projadd.8
blob216f5c354c1b87f9421006b2f41d58b666b3d194
1 '\" te
2 .\" Copyright (c) 2018 Peter Tribble.
3 .\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH PROJADD 8 "Jan 7, 2018"
8 .SH NAME
9 projadd \- administer a new project on the system
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBprojadd\fR [\fB-n\fR] [\fB-f\fR \fIfilename\fR] [\fB-p\fR \fIprojid\fR [\fB-o\fR]] [\fB-c\fR \fIcomment\fR]
14      [\fB-U\fR \fIuser\fR[,\fIuser\fR]...] [\fB-G\fR \fIgroup\fR[,\fIgroup\fR]...]
15      [\fB-K\fR \fIname\fR[=\fIvalue\fR[,\fIvalue\fR]...]]... \fIproject\fR
16 .fi
18 .SH DESCRIPTION
19 .LP
20 \fBprojadd\fR adds a new project entry to the \fB/etc/project\fR file. If the
21 files backend is being used for the project database, the new project is
22 available for use immediately upon the completion of the \fBprojadd\fR command.
23 .SH OPTIONS
24 .LP
25 The following options are supported:
26 .sp
27 .ne 2
28 .na
29 \fB\fB-c\fR \fIcomment\fR\fR
30 .ad
31 .RS 29n
32 Add a project comment. Comments are stored in the project's entry in the
33 \fB/etc/project\fR file. Generally, comments contain a short description of the
34 project and are used as the field for the project's full name.
35 .sp
36 Specify \fIcomment\fR as a text string. \fIcomment\fR cannot contain a colon
37 (\fB:\fR) or NEWLINE.
38 .RE
40 .sp
41 .ne 2
42 .na
43 \fB\fB-f\fR \fIfilename\fR\fR
44 .ad
45 .RS 29n
46 Specify the project file to modify. If no \fIfilename\fR is specified, the
47 system project file, \fB/etc/project\fR, is modified.
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fB-G\fR \fIgroup\fR[,\fIgroup\fR]...\fR
54 .ad
55 .RS 29n
56 Specify a group list for the project.
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fB-K\fR \fIname\fR[=\fIvalue\fR[,\fIvalue\fR]...]\fR
63 .ad
64 .RS 29n
65 Specify an attribute list for the project. Multiple \fB-K\fR options can be
66 specified to set values on multiple keys, such as:
67 .sp
68 .in +2
69 .nf
70 -K \fIkey1\fR=\fIvalue1\fR -K "\fIkey2\fR=(\fIvalue2a\fR),(\fIvalue2b\fR)"
71 .fi
72 .in -2
74 Resource control attributes use parentheses to specify values for a key.
75 Because many user shells interpret parentheses as special characters, it is
76 best to enclose an argument to \fB-K\fR that contains parentheses with double
77 quotes, as shown above and in EXAMPLES, below. See \fBresource_controls\fR(5)
78 for a description of the resource controls you can specify for a project.
79 .RE
81 .sp
82 .ne 2
83 .na
84 \fB\fB-n\fR\fR
85 .ad
86 .RS 29n
87 Syntax check. Check the format of the existing system project file and
88 modifications only. The contents of the existing project file, such as user
89 names, group names, and resources that are specified in the project attributes
90 are not checked.
91 .RE
93 .sp
94 .ne 2
95 .na
96 \fB\fB-o\fR\fR
97 .ad
98 .RS 29n
99 This option allows the project ID specified by the \fB-p\fR option to be
100 non-unique within the project file.
104 .ne 2
106 \fB\fB-p\fR \fIprojid\fR\fR
108 .RS 29n
109 Set the project \fBID\fR of the new project.
111 Specify \fIprojid\fR as a non-negative decimal integer below \fBUID_MAX\fR as
112 defined in \fBlimits.h\fR. \fIprojid\fR defaults to the next available unique
113 number above the highest number currently assigned. For example, if
114 \fIprojid\fRs \fB100\fR, \fB105\fR, and \fB200\fR are assigned, the next
115 default \fIprojid\fR is \fB201\fR. \fIprojid\fRs between \fB0\fR-\fB99\fR are
116 reserved.
120 .ne 2
122 \fB\fB-U\fR \fIuser\fR[,\fIuser\fR]...\fR
124 .RS 29n
125 Specify a user list for the project.
128 .SH OPERANDS
130 The following operands are supported:
132 .ne 2
134 \fB\fIproject\fR\fR
136 .RS 11n
137 The name of the project to create. The \fIproject\fR operand is a string
138 consisting of characters from the set of alphabetic characters, numeric
139 characters, underline (_), and hyphen (-). The period ('.') is reserved for
140 projects with special meaning to the operating system. The first character of
141 the project name must be a letter. An error message is displayed if these
142 restrictions are not met.
145 .SH EXAMPLES
147 \fBExample 1\fR Adding a Project
150 The following command creates the project \fBsalesaudit\fR and sets the
151 resource controls specified as arguments to the \fB-K\fR option.
154 .in +2
156 projadd -p 111 -G sales,finance -c "Auditing Project" \e
157    -K "rcap.max-rss=10GB" \e
158    -K "process.max-file-size=(priv,50MB,deny)" \e
159    -K "task.max-lwps=(priv,100,deny)" salesaudit
161 .in -2
165 This command would produce the following entry in \fB/etc/project\fR:
168 .in +2
170 salesaudit:111:Auditing Project::sales,finance: \e
171 process.max-file-size=(priv,52428800,deny); \e
172 rcap.max-rss=10737418240;task.max-lwps=(priv,100,deny)
174 .in -2
178 Note that the preceding would appear as one line in \fB/etc/project\fR.
182 Comparing the \fBprojadd\fR command and resulting output in \fB/etc/project\fR,
183 note the effect of the scaling factor in the resource cap
184 (\fBrcap.max-rss=10GB\fR) and the resource control
185 (\fBprocess.max-file-size=(priv,50MB,deny)\fR). Modifiers, such as B, KB, and
186 MB, and scaling factors are specified in \fBresource_controls\fR(5).
188 .SH EXIT STATUS
190 The following exit values are returned:
192 .ne 2
194 \fB\fB0\fR\fR
196 .RS 6n
197 Successful completion.
201 .ne 2
203 \fB\fB2\fR\fR
205 .RS 6n
206 The command syntax was invalid. A usage message for \fBprojadd\fR is displayed.
210 .ne 2
212 \fB\fB3\fR\fR
214 .RS 6n
215 An invalid argument was provided to an option.
219 .ne 2
221 \fB\fB4\fR\fR
223 .RS 6n
224 The \fIprojid\fR given with the \fB-p\fR option is already in use.
228 .ne 2
230 \fB\fB5\fR\fR
232 .RS 6n
233 The project files contain an error. See \fBproject\fR(4).
237 .ne 2
239 \fB\fB6\fR\fR
241 .RS 6n
242 The project to be added, group, user, or resource does not exist.
246 .ne 2
248 \fB\fB9\fR\fR
250 .RS 6n
251 The project is already in use.
255 .ne 2
257 \fB\fB10\fR\fR
259 .RS 6n
260 Cannot update the \fB/etc/project\fR file.
263 .SH FILES
264 .ne 2
266 \fB\fB/etc/project\fR\fR
268 .RS 16n
269 System project file
272 .SH ATTRIBUTES
274 See \fBattributes\fR(5) for descriptions of the following attributes:
279 box;
280 c | c
281 l | l .
282 ATTRIBUTE TYPE  ATTRIBUTE VALUE
284 Interface Stability     See below.
289 Invocation is evolving. Human readable output is unstable.
290 .SH SEE ALSO
292 \fBprojects\fR(1), \fBgroupadd\fR(8), \fBgroupdel\fR(8), \fBgroupmod\fR(8),
293 \fBgrpck\fR(8), \fBprojdel\fR(8), \fBprojmod\fR(8), \fBuseradd\fR(8),
294 \fBuserdel\fR(8), \fBusermod\fR(8), \fBproject\fR(4), \fBattributes\fR(5),
295 \fBresource_controls\fR(5)
296 .SH NOTES
298 In case of an error, \fBprojadd\fR prints an error message and exits with a
299 non-zero status.
302 \fBprojadd\fR adds a project definition only on the local system. If a network
303 name service is being used to supplement the local
304 \fB/etc/project\fR file with additional entries, \fBprojadd\fR cannot change
305 information supplied by the network name service.