2 .\" Copyright (c) 2001, Sun Microsystems, Inc. All Rights Reserved.
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH PROJADD 1M "Sep 30, 2004"
8 projadd \- administer a new project on the system
12 \fBprojadd\fR [\fB-n\fR] [\fB-f\fR \fIfilename\fR] [\fB-p\fR \fIprojid\fR [\fB-o\fR]] [\fB-c\fR \fIcomment\fR]
13 [\fB-U\fR \fIuser\fR [,\fIuser\fR]... ] [\fB-G\fR \fIgroup\fR [,\fIgroup\fR]... ]
14 [ [\fB-K\fR \fIname\fR [=\fIvalue\fR [,\fIvalue\fR]...]...]] \fIproject\fR
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.
26 The following options are supported:
30 \fB\fB-c\fR \fIcomment\fR\fR
33 Add a project comment. Comments are stored in the project's entry in the
34 \fB/etc/project\fR file. Generally, comments contain a short description of the
35 project and are used as the field for the project's full name.
37 Specify \fIcomment\fR as a text string. \fIcomment\fR cannot contain a colon
44 \fB\fB-f\fR \fIfilename\fR\fR
47 Specify the project file to modify. If no \fIfilename\fR is specified, the
48 system project file, \fB/etc/project\fR, is modified.
54 \fB\fB-G\fR \fIgroup\fR[,group...]\fR
57 Specify a group list for the project.
63 \fB\fB-K\fR \fIname\fR[=\fIvalue\fR[,\fIvalue\fR...]\fR
66 Specify an attribute list for the project. Multiple \fB-K\fR options can be
67 specified to set values on multiple keys, such as:
71 -K \fIkey1\fR=\fIvalue1\fR -K "\fIkey2\fR=(\fIvalue2a\fR),(\fIvalue2b\fR)"
75 Resource control attributes use parentheses to specify values for a key.
76 Because many user shells interpret parentheses as special characters, it is
77 best to enclose an argument to \fB-K\fR that contains parentheses with double
78 quotes, as shown above and in EXAMPLES, below. See \fBresource_controls\fR(5)
79 for a description of the resource controls you can specify for a project.
88 Syntax check. Check the format of the existing system project file and
89 modifications only. The contents of the existing project file, such as user
90 names, group names, and resources that are specified in the project attributes
100 This option allows the project ID specified by the \fB-p\fR option to be
101 non-unique within the project file.
107 \fB\fB-p\fR \fIprojid\fR\fR
110 Set the project \fBID\fR of the new project.
112 Specify \fIprojid\fR as a non-negative decimal integer below \fBUID_MAX\fR as
113 defined in \fBlimits.h\fR. \fIprojid\fR defaults to the next available unique
114 number above the highest number currently assigned. For example, if
115 \fIprojid\fRs \fB100\fR, \fB105\fR, and \fB200\fR are assigned, the next
116 default \fIprojid\fR is \fB201\fR. \fIprojid\fRs between \fB0\fR-\fB99\fR are
123 \fB\fB-U\fR \fIuser\fR[,user...]\fR
126 Specify a user list for the project.
132 The following operands are supported:
139 The name of the project to create. The \fIproject\fR operand is a string
140 consisting of characters from the set of alphabetic characters, numeric
141 characters, underline (_), and hyphen (-). The period ('.') is reserved for
142 projects with special meaning to the operating system. The first character of
143 the project name must be a letter. An error message is displayed if these
144 restrictions are not met.
149 \fBExample 1 \fRAdding a Project
152 The following command creates the project \fBsalesaudit\fR and sets the
153 resource controls specified as arguments to the \fB-K\fR option.
158 projadd -p 111 -G sales,finance -c "Auditing Project" \e
159 -K "rcap.max-rss=10GB" \e
160 -K "process.max-file-size=(priv,50MB,deny)" \e
161 -K "task.max-lwps=(priv,100,deny)" salesaudit
167 This command would produce the following entry in \fB/etc/project\fR:
172 salesaudit:111:Auditing Project::sales,finance: \e
173 process.max-file-size=(priv,52428800,deny); \e
174 rcap.max-rss=10737418240;task.max-lwps=(priv,100,deny)
180 Note that the preceding would appear as one line in \fB/etc/project\fR.
184 Comparing the \fBprojadd\fR command and resulting output in \fB/etc/project\fR,
185 note the effect of the scaling factor in the resource cap
186 (\fBrcap.max-rss=10GB\fR) and the resource control
187 (\fBprocess.max-file-size=(priv,50MB,deny)\fR). Modifiers, such as B, KB, and
188 MB, and scaling factors are specified in \fBresource_controls\fR(5).
193 The following exit values are returned:
200 Successful completion.
209 The command syntax was invalid. A usage message for \fBprojadd\fR is displayed.
218 An invalid argument was provided to an option.
227 The \fIprojid\fR given with the \fB-p\fR option is already in use.
236 The project files contain an error. See \fBproject\fR(4).
245 The project to be added, group, user, or resource does not exist.
254 The project is already in use.
263 Cannot update the \fB/etc/project\fR file.
270 \fB\fB/etc/project\fR\fR
279 See \fBattributes\fR(5) for descriptions of the following attributes:
287 ATTRIBUTE TYPE ATTRIBUTE VALUE
289 Interface Stability See below.
294 Invocation is evolving. Human readable output is unstable.
298 \fBprojects\fR(1), \fBgroupadd\fR(1M), \fBgroupdel\fR(1M), \fBgroupmod\fR(1M),
299 \fBgrpck\fR(1M), \fBprojdel\fR(1M), \fBprojmod\fR(1M), \fBuseradd\fR(1M),
300 \fBuserdel\fR(1M), \fBusermod\fR(1M), \fBproject\fR(4), \fBattributes\fR(5),
301 \fBresource_controls\fR(5)
305 In case of an error, \fBprojadd\fR prints an error message and exits with a
309 \fBprojadd\fR adds a project definition only on the local system. If a network
310 name service such as NIS or LDAP is being used to supplement the local
311 \fB/etc/project\fR file with additional entries, \fBprojadd\fR cannot change
312 information supplied by the network name service.