Oracle® Solaris 11 安全性準則

結束列印檢視

更新日期: 2014 年 9 月
 
 

如何移除使用者不需要的基本權限

在特定情況下,可以移除一般使用者或來賓使用者之基本設定中的部分基本權限。例如,讓 Sun Ray 使用者無法檢查不屬於他們的程序狀態。

開始之前

您必須擔任 root 角色。如需更多資訊,請參閱Securing Users and Processes in Oracle Solaris 11.2 中的Using Your Assigned Administrative Rights

  1. 列出基本權限設定的完整定義。

    以下是三種可以移除的基本權限。

    % ppriv -lv basic
    file_link_any
    	Allows a process to create hardlinks to files owned by a uid
    	different from the process' effective uid.
    ...
    proc_info
    	Allows a process to examine the status of processes other
    	than those it can send signals to.  Processes which cannot
    	be examined cannot be seen in /proc and appear not to exist.
    proc_session
    	Allows a process to send signals or trace processes outside its
    	session.
    ...
  2. 選擇權限的移除範圍。
    • 設定全系統。

      嘗試使用系統的所有使用者將無這些權限。此權限移除方法適用於公用電腦。

      # pfedit /etc/security/policy.conf
      ...
      #PRIV_DEFAULT=basic
      PRIV_DEFAULT=basic,!file_link_any,!proc_info,!proc_session
    • 移除個別使用者的權限。
      • 防止使用者連結至不屬於使用者的檔案。
        # usermod -K 'defaultpriv=basic,!file_link_any' user
      • 防止使用者檢查不屬於使用者的程序。
        # usermod -K 'defaultpriv=basic,!proc_info' user
      • 防止使用者啟動第二個階段作業,例如從使用者目前的階段作業啟動 ssh 階段作業。
        # usermod -K 'defaultpriv=basic,!proc_session' user
      • 移除使用者之基本設定中的這三種權限。
        # usermod -K 'defaultpriv=basic,!file_link_any,!proc_info,!proc_session' user
    • 建立並指派權限設定檔。

      此類保護適用於您指派此權限設定檔的所有使用者或系統。

      1. 建立權限設定檔。
        # profiles -p shared-profile -S ldap
        shared-profile: set defaultpriv=basic,!file_link_any,!proc_info,!proc_session
        ...

        如需更多建立權限設定檔的資訊,請參閱Securing Users and Processes in Oracle Solaris 11.2 中的Creating Rights Profiles and Authorizations

      2. 將權限設定檔指派給使用者或全系統。

        如果許多使用者共用一個權限設定檔 (例如 Sun Ray 使用者或遠端使用者),可以在權限設定檔中設定這個值,作為具備可擴充性的解決方案。

        # usermod -P shared-profile username

        您也可以在 policy.conf 檔案中個別指派每個系統的設定檔。

        # pfedit /etc/security/policy.conf
        ...
        #PROFS_GRANTED=Basic Solaris User
        PROFS_GRANTED=shared-profile,Basic Solaris User

另請參閱

如需更多資訊,請參閱Securing Users and Processes in Oracle Solaris 11.2 中的第 1 章About Using Rights to Control Users and Processesprivileges(5) 線上手冊。