2 .\" Copyright (c) 2018 Peter Tribble.
3 .\" Copyright (c) 2007, 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 PROJMOD 1M "Jan 7, 2018"
9 projmod \- modify a project's information on the system
13 \fBprojmod\fR [\fB-n\fR] [\fB-A\fR|\fB-f\fR \fIfilename\fR | -]
18 \fBprojmod\fR [\fB-n\fR] [\fB-A\fR|\fB-f\fR \fIfilename\fR | -] [\fB-p\fR \fIprojid\fR [\fB-o\fR]]
19 [\fB-c\fR \fIcomment\fR] [\fB-a\fR|\fB-s\fR|\fB-r\fR] [\fB-U\fR \fIuser\fR[,\fIuser\fR]...]
20 [\fB-G\fR \fIgroup\fR[,\fIgroup\fR]...]
21 [\fB-K\fR \fIname\fR[=\fIvalue\fR[,\fIvalue\fR]...]]...
22 [\fB-l\fR \fInew_projectname\fR] \fIproject\fR
27 The \fBprojmod\fR utility modifies a project's definition on the system.
28 \fBprojmod\fR changes the definition of the specified project and makes the
29 appropriate project-related system file and file system changes.
32 The following options are supported:
39 Apply the project's resource controls, as defined in the system's project
40 database, to the project if it is active.
49 Specify that the users, groups, attributes, or attribute values specified by
50 the \fB-U\fR, \fB-G\fR or \fB-K\fR options should be added to the project,
51 rather than replacing the existing member or attribute list.
57 \fB\fB-c\fR \fIcomment\fR\fR
60 Specify \fIcomment\fR as a text string. Generally, \fIcomment\fR contains a
61 short description of the project. This information is stored in the project's
62 \fB/etc/project\fR entry.
68 \fB\fB-f\fR \fIfilename\fR | -\fR
71 Specify the project file to modify or validate or specify input from stdin for
72 validation. As noted under OPERANDS, if you do not specify a project in a
73 \fBprojmod\fR command line, \fBprojmod\fR validates the argument to \fB-f\fR.
74 If you do not use this option, the system project file, \fB/etc/project\fR, is
81 \fB\fB-G\fR \fIgroup\fR[,\fIgroup\fR]...]fR
84 Specify a replacement list of member groups of the project. When used in
85 conjunction with the \fB-a\fR or \fB-r\fR options, this option specifies a list
86 of groups to be added or removed from the project.
92 \fB\fB-K\fR \fIname\fR[=\fIvalue\fR[,\fIvalue\fR]...]\fR
95 Specify a replacement list of project attributes for the project. When used in
96 conjunction with the \fB-a\fR, \fB-r\fR, or \fB-s\fR options, this option
97 specifies a list of attribute values to be added, removed, or replaced in the
98 project. Attributes must be delimited by semicolons (\fB;\fR). Multiple
99 \fB-K\fR options can be specified to set, add, remove, or substitute values on
100 multiple keys, such as:
104 -K \fIkey1\fR=\fIvalue1\fR -K "\fIkey2\fR=(\fIvalue2a\fR),(\fIvalue2b\fR)"
108 Resource control attributes use parentheses to specify values for a key.
109 Because many user shells interpret parentheses as special characters, it is
110 best to enclose an argument to \fB-K\fR that contains parentheses with double
111 quotes, as shown above and in EXAMPLES, below. See \fBresource_controls\fR(5)
112 for a description of the resource controls you can specify for a project.
118 \fB\fB-l\fR \fInew_projectname\fR\fR
121 Specify the new project name for the project. The \fInew_projectname\fR
122 argument is a string consisting of characters from the set of alphabetic
123 characters, numeric characters, period (\fB\&.\fR), underline (\fB_\fR), and
124 hyphen (\fB-\fR). The first character should be alphabetic. An error message is
125 written if these restrictions are not met. The project name must also be unique
126 within the project file.
135 Syntax check. Check the format of the existing system project file and
136 modifications only. The contents of the existing project file, such as user
137 names, group names, and resources that are specified in the project attributes
147 This option allows the project ID specified by the \fB-p\fR option to be
148 non-unique within the project file.
154 \fB\fB-p\fR \fIprojid\fR\fR
157 Specify a new project \fBID\fR for the project. It must be a non-negative
158 decimal integer less than \fBMAXUID\fR as defined in \fB<sys/param.h>\fR. This
159 value must be unique within the project file if the \fB-o\fR option is not
169 Specify that the users, groups, attributes, or attribute values specified by
170 the \fB-U\fR, \fB-G\fR or \fB-K\fR options should be removed from the project,
171 rather than replacing the existing member or attribute list.
180 Specify that the list of attributes specified by the \fB-K\fR option should
181 have their values replaced. If the attributes do not exist, they are added as
182 if the a option was used. This option has no effect the \fB-U\fR or \fB-G\fR
189 \fB\fB-U\fR \fIuser\fR[,\fIuser\fR]...\fR
192 Specify a replacement list of member users of the project. When used in
193 conjunction with the \fB-a\fR or \fB-r\fR options, this option specifies a list
194 of users to be added or removed from the project.
199 The following operands are supported:
206 An existing project name to be modified or displayed.
215 If no operand is given, the project file is validated without modifying any
221 \fBExample 1\fR Using the \fB-K\fR Option for Addition of an Attribute Value
224 Consider the following \fBproject\fR(4) entry:
229 salesaudit:111:Auditing Project::sales,finance: \e
230 process.max-file-size=(priv,52428800,deny); \e
231 task.max-lwps=(priv,100,deny)
237 The preceding would appear as one line in \fB/etc/project\fR. For this and the
238 following examples, the focus is on the attributes field in the \fBproject\fR
239 entry. That is, the last field, the field following the last semicolon.
243 The attributes field for the project \fBsalesaudit\fR lists the following
249 task.max-lwps=(priv,1000,signal=KILL)
255 The following \fBprojmod\fR command adds an action clause to the preceding
261 # projmod -a -K "task.max-lwps=(priv,100,deny)" salesaudit
267 \&...with the resulting attributes field in the entry for \fBsalesaudit\fR:
272 task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)
277 \fBExample 2\fR Using the \fB-K\fR Option for the Substitution of an Attribute
281 Assume an attributes field in a \fBproject\fR(4) entry for the project
282 \fBsalesaudit\fR that lists the following resource control:
287 task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)
293 The following \fBprojmod\fR command substitutes the action clause specified in
294 the command for the action clauses in the preceding entry:
299 # projmod -s -K "task.max-lwps=(priv,500,signal=SIGSTOP)" salesaudit
305 \&...with the resulting attributes field in the entry for \fBsalesaudit\fR:
310 task.max-lwps=(priv,500,signal=SIGSTOP)
315 \fBExample 3\fR Using the \fB-K\fR Option for Removal of an Attribute Value
318 Assume an attributes field in a \fBproject\fR(4) entry for a project
319 \fBsalesaudit\fR that lists the following resource control:
324 task.max-lwps=(priv,100,deny),(priv,1000,signal=KILL)
330 The following \fBprojmod\fR command removes the first action clause from the
336 # projmod -r -K "task.max-lwps=(priv,100,deny)" salesaudit
342 \&...with the resulting attributes field in the entry for \fBsalesaudit\fR:
347 task.max-lwps=(priv,1000,signal=KILL)
352 \fBExample 4\fR Specifying Multiple Attribute Values
355 Suppose you want to achieve the following resource controls for the project
361 task.max-lwps=(priv,100,deny)
362 process.max-file-size=(priv,50MB,deny)
368 The following \fBprojmod\fR command adds these resource controls for
374 # projmod -a -K "task.max-lwps=(priv,100,deny)" \e
375 -K "process.max-file-size=(priv,50MB,deny)" salesaudit
381 \&...with the resulting attributes field in the entry for \fBsalesaudit\fR:
386 task.max-lwps=(priv,100,deny);process.max-file-size=(priv,52428800,deny)
392 In this example, note the effect of the use of the modifier and scaling factor
393 for the resource control \fBprocess.max-file-size\fR. The specification in
399 "process.max-file-size=(priv,50MB,deny)"
405 \&...becomes, in \fB/etc/project\fR:
410 process.max-file-size=(priv,52428800,deny)
416 That is, \fB50MB\fR is expanded to \fB52428800\fR. The modifiers, such as MB,
417 and scaling factors you can use for resource controls are specified in
418 \fBresource_controls\fR(5).
421 \fBExample 5\fR Binding a Pool to a Project
424 The following command sets the \fBproject.pool\fR attribute for the project
430 # projmod -a -K project.pool=salespool sales
435 \fBExample 6\fR Evaluating Input from \fBstdin\fR
438 The following command uses the \fB-f\fR option without a project name operand
439 to evaluate the contents of an NIS projects map.
444 # ypcat project | projmod -f -
450 In case of an error, \fBprojmod\fR prints an error message and exits with one
451 of the following values:
454 The following exit values are returned:
461 Successful completion.
470 The command syntax was invalid. A usage message for \fBprojmod\fR is displayed.
479 An invalid argument was provided to an option.
488 The \fIprojid\fR given with the \fB-p\fR option is already in use.
497 The project files contain an error. See \fBproject\fR(4).
506 The project to be modified, group, user, or resource does not exist.
515 The project is already in use.
524 Cannot update the \fB/etc/project\fR file.
530 \fB\fB/etc/group\fR\fR
533 System file containing group definitions
539 \fB\fB/etc/project\fR\fR
548 \fB\fB/etc/passwd\fR\fR
557 \fB\fB/etc/shadow\fR\fR
560 System file containing users' encrypted passwords and related information
565 See \fBattributes\fR(5) for descriptions of the following attributes:
573 ATTRIBUTE TYPE ATTRIBUTE VALUE
575 Interface Stability See below.
580 Invocation is evolving. Human readable output is unstable.
583 \fBgroupadd\fR(1M), \fBgroupdel\fR(1M), \fBgroupmod\fR(1M), \fBprojadd\fR(1M),
584 \fBprojdel\fR(1M), \fBuseradd\fR(1M), \fBuserdel\fR(1M), \fBusermod\fR(1M),
585 \fBpasswd\fR(4), \fBproject\fR(4), \fBattributes\fR(5),
586 \fBresource_controls\fR(5)
589 The \fBprojmod\fR utility modifies project definitions only in the local
590 \fB/etc/project\fR file. If a network name service
591 is being used to supplement the local files with additional entries,
592 \fBprojmod\fR cannot change information supplied by the network name service.
593 However \fBprojmod\fR verifies the uniqueness of project name and project
594 \fBID\fR against the external name service.