次の例は、projadd コマンドを使用してプロジェクトエントリを追加し、projmod コマンドを使用してそのエントリを変更する方法を示します。
スーパーユーザーになるか、同等の役割を引き受けます。
役割には、認証と特権コマンドが含まれます。役割の詳細については、『Solaris のシステム管理 (基本編)』の「Solaris 管理ツールを RBAC と組み合わせて使用する (作業マップ)」を参照してください。
projects -l を使用して、システムのデフォルトの /etc/project ファイルを表示します。
# 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:
|
booksite という名前のプロジェクトを追加します。追加したプロジェクトを mark という名前のユーザーにプロジェクト ID 番号 4113 で割り当てます。
# projadd -U mark -p 4113 booksite |
再度 /etc/project ファイルを表示します。
# 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:
|
comment フィールドにプロジェクトを説明するコメントを追加します。
# projmod -c `Book Auction Project' booksite |
/etc/project ファイルに加えた変更を確認します。
# 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:
|
プロジェクト、タスク、およびプロセスをプールに結合する方法については、「プール属性の設定とプールへの結合」を参照してください。