有关使用角色的更多信息,请参见在 Oracle Solaris 11.2 中确保用户和进程的安全 中的为用户指定权限。
以下示例将两个现有权限配置文件添加到新的配置文件中。
# profiles -p new-profile profiles:new-profile> set desc="description" profiles:new-profile> add profiles="Unified Archive Administration" profiles:new-profile> add profiles="Zone Security" profiles:new-profile> commit; end; exit
在此步骤中,我们还将为新角色设置口令。
# roleadd -c "comment" -m -K profiles"new-profile" new-role # passwd new-role Password: xxxxxxxx Confirm password: xxxxxxxx
# usermod -R +new-role user