系统管理指南:Oracle Solaris Containers-资源管理和 Oracle Solaris Zones

Procedure如何从 /etc/project 文件中删除项目

此示例显示如何使用 projdel 命令删除项目。

  1. 成为超级用户或承担等效角色。

    角色包含授权和具有一定权限的命令。有关角色的更多信息,请参见《系统管理指南:基本管理》中的“使用 RBAC 和 Solaris 管理工具(任务图)”

  2. 使用 projdel 命令删除 booksite 项目。


    # projdel booksite
    
  3. 显示 /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: 
  4. 以用户 mark 的身份登录并键入 projects 来查看指定给此用户的项目。


    # su - mark
    # projects
    default