su Command
The su command joins the target user's default project by creating a new task, as part of simulating a login.
To switch the user's default project by using the su command, type the following:
# su user |
Administering Projects
How to Define a Project and View the Current Project
This example shows how to use the projadd command to add a project entry and the projmod command to alter that entry.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.
View the default /etc/project file on your system by using projects -l.
# projects -l system:0:::: user.root:1:::: noproject:2:::: default:3:::: group.staff:10::::system projid : 0 comment: "" users : (none) groups : (none) attribs: user.root projid : 1 comment: "" users : (none) groups : (none) attribs: noproject projid : 2 comment: "" users : (none) groups : (none) attribs: default projid : 3 comment: "" users : (none) groups : (none) attribs: group.staff projid : 10 comment: "" users : (none) groups : (none) attribs:
Add a project with the name booksite. Assign the project to a user who is named mark with project ID number 4113.
# projadd -U mark -p 4113 booksite
View the /etc/project file again.
# projects -l system projid : 0 comment: "" users : (none) groups : (none) attribs: user.root projid : 1 comment: "" users : (none) groups : (none) attribs: noproject projid : 2 comment: "" users : (none) groups : (none) attribs: default projid : 3 comment: "" users : (none) groups : (none) attribs: group.staff projid : 10 comment: "" users : (none) groups : (none) attribs: booksite projid : 4113 comment: "" users : mark groups : (none) attribs:
Add a comment that describes the project in the comment field.
# projmod -c `Book Auction Project' booksite
View the changes in the /etc/project file.
# projects -l system projid : 0 comment: "" users : (none) groups : (none) attribs: user.root projid : 1 comment: "" users : (none) groups : (none) attribs: noproject projid : 2 comment: "" users : (none) groups : (none) attribs: default projid : 3 comment: "" users : (none) groups : (none) attribs: group.staff projid : 10 comment: "" users : (none) groups : (none) attribs: booksite projid : 4113 comment: "Book Auction Project" users : mark groups : (none) attribs:
See Also
To bind projects, tasks, and processes to a pool, see Setting Pool Attributes and Binding to a Pool.