1projadd(1M)             System Administration Commands             projadd(1M)
2
3
4

NAME

6       projadd - administer a new project on the system
7

SYNOPSIS

9       projadd [-n] [-f filename] [-p projid [-o]] [-c comment]
10            [-U user [,user]... ] [-G group [,group]... ]
11            [ [-K name [=value [,value]...]...]] project
12
13

DESCRIPTION

15       projadd adds a new project entry to the /etc/project file. If the files
16       backend is being used for the project  database,  the  new  project  is
17       available  for  use immediately upon the completion of the projadd com‐
18       mand.
19

OPTIONS

21       The following options are supported:
22
23       -c comment                   Add a project comment. Comments are stored
24                                    in the project's entry in the /etc/project
25                                    file. Generally, comments contain a  short
26                                    description of the project and are used as
27                                    the field for the project's full name.
28
29                                    Specify comment as a text string.  comment
30                                    cannot contain a colon (:) or NEWLINE.
31
32
33       -f filename                  Specify  the project file to modify. If no
34                                    filename is specified, the system  project
35                                    file, /etc/project, is modified.
36
37
38       -G group[,group...]          Specify a group list for the project.
39
40
41       -K name[=value[,value...]    Specify an attribute list for the project.
42                                    Multiple -K options can  be  specified  to
43                                    set values on multiple keys, such as:
44
45                                      -K key1=value1 -K "key2=(value2a),(value2b)"
46
47                                    Resource  control attributes use parenthe‐
48                                    ses to specify values for a  key.  Because
49                                    many  user shells interpret parentheses as
50                                    special characters, it is best to  enclose
51                                    an  argument to -K that contains parenthe‐
52                                    ses with double quotes, as shown above and
53                                    in   EXAMPLES,  below.  See  resource_con‐
54                                    trols(5) for a description of the resource
55                                    controls you can specify for a project.
56
57
58       -n                           Syntax  check.  Check  the  format  of the
59                                    existing system project file and modifica‐
60                                    tions  only.  The contents of the existing
61                                    project file, such as  user  names,  group
62                                    names, and resources that are specified in
63                                    the project attributes are not checked.
64
65
66       -o                           This option allows the project  ID  speci‐
67                                    fied  by  the  -p  option to be non-unique
68                                    within the project file.
69
70
71       -p projid                    Set the project ID of the new project.
72
73                                    Specify projid as a  non-negative  decimal
74                                    integer  below  UID_MAX as defined in lim‐
75                                    its.h. projid defaults to the next  avail‐
76                                    able  unique number above the highest num‐
77                                    ber currently assigned.  For  example,  if
78                                    projids  100,  105,  and 200 are assigned,
79                                    the next default projid  is  201.  projids
80                                    between 0-99 are reserved by SunOS.
81
82
83       -U user[,user...]            Specify a user list for the project.
84
85

OPERANDS

87       The following operands are supported:
88
89       project    The  name of the project to create. The project operand is a
90                  string consisting of characters from the set  of  alphabetic
91                  characters,  numeric  characters,  underline (_), and hyphen
92                  (-). The period ('.') is reserved for projects with  special
93                  meaning  to the operating system. The first character of the
94                  project name must be a letter. An error message is displayed
95                  if these restrictions are not met.
96
97

EXAMPLES

99       Example 1 Adding a Project
100
101
102       The  following  command  creates  the  project  salesaudit and sets the
103       resource controls specified as arguments to the -K option.
104
105
106         projadd -p 111 -G sales,finance -c "Auditing Project" \
107            -K "rcap.max-rss=10GB" \
108            -K "process.max-file-size=(priv,50MB,deny)" \
109            -K "task.max-lwps=(priv,100,deny)" salesaudit
110
111
112
113       This command would produce the following entry in /etc/project:
114
115
116         salesaudit:111:Auditing Project::sales,finance: \
117         process.max-file-size=(priv,52428800,deny); \
118         rcap.max-rss=10737418240;task.max-lwps=(priv,100,deny)
119
120
121
122       Note that the preceding would appear as one line in /etc/project.
123
124
125
126       Comparing the projadd command and  resulting  output  in  /etc/project,
127       note  the  effect  of the scaling factor in the resource cap (rcap.max-
128       rss=10GB)    and    the     resource     control     (process.max-file-
129       size=(priv,50MB,deny)).  Modifiers,  such as B, KB, and MB, and scaling
130       factors are specified in resource_controls(5).
131
132

EXIT STATUS

134       The following exit values are returned:
135
136       0     Successful completion.
137
138
139       2     The command syntax was invalid. A usage message  for  projadd  is
140             displayed.
141
142
143       3     An invalid argument was provided to an option.
144
145
146       4     The projid given with the -p option is already in use.
147
148
149       5     The project files contain an error. See project(4).
150
151
152       6     The project to be added, group, user, or resource does not exist.
153
154
155       9     The project is already in use.
156
157
158       10    Cannot update the /etc/project file.
159
160

FILES

162       /etc/project    System project file
163
164

ATTRIBUTES

166       See attributes(5) for descriptions of the following attributes:
167
168
169
170
171       ┌────────────────────────────────────────────────────────┬─────────────────┐
172       │                    ATTRIBUTE TYPE                      │ ATTRIBUTE VALUE │
173       ├────────────────────────────────────────────────────────┼─────────────────┤
174       │Availability                                            │ SUNWesu         │
175       ├────────────────────────────────────────────────────────┼─────────────────┤
176       │Interface Stability                                     │ See below.      │
177       └────────────────────────────────────────────────────────┴─────────────────┘
178
179
180       Invocation is evolving. Human readable output is unstable.
181

SEE ALSO

183       projects(1),  groupadd(1M), groupdel(1M), groupmod(1M), grpck(1M), pro‐
184       jdel(1M),   projmod(1M),   useradd(1M),    userdel(1M),    usermod(1M),
185       project(4), attributes(5), resource_controls(5)
186

NOTES

188       In  case  of an error, projadd prints an error message and exits with a
189       non-zero status.
190
191
192       projadd adds a project definition only on the local system. If  a  net‐
193       work  name  service such as NIS or LDAP is being used to supplement the
194       local /etc/project file with additional entries, projadd cannot  change
195       information supplied by the network name service.
196
197
198
199SunOS 5.11                        30 Sep 2004                      projadd(1M)
Impressum