Go to main content
Oracle® Solaris 11.3 でのユーザーとプロセスのセキュリティー保護

印刷ビューの終了

更新: 2016 年 11 月
 
 

権利とその定義の一覧表示

このセクションのコマンドを使用すると、システムで定義されている権利を検索し、ユーザーのプロセスに対して有効な権利を一覧表示できます。

承認の一覧表示

  • auths – 現在のユーザーの承認を一覧表示します

  • auths list – 現在のユーザーの承認を一覧表示します

  • auths list -u usernameusername の承認を一覧表示します

  • auths list -x – 認証が必要な現在のユーザーの承認を一覧表示します

  • auths list -xu username – 認証が必要な username の承認を一覧表示します

  • auths info – ネームサービス内のすべての承認名を一覧表示します

  • getent auth_attr – ネームサービス内のすべての承認の完全な定義を一覧表示します

使用例 53  すべての承認の一覧表示
$ auths info
    solaris.account.activate
    solaris.account.setpolicy
    solaris.admin.edit
...
    solaris.zone.login
    solaris.zone.manage
使用例 54  承認データベースの内容の一覧表示
$ getent auth_attr | more
solaris.:::All Solaris Authorizations::help=AllSolAuthsHeader.html
solaris.account.:::Account Management::help=AccountHeader.html
...
solaris.zone.login:::Zone Login::help=ZoneLogin.html
solaris.zone.manage:::Zone Deployment::help=ZoneManage.html
使用例 55  ユーザーのデフォルト承認の一覧表示

次に示す承認は、デフォルトですべてのユーザーに割り当てられる権利プロファイルに含まれています。

$ auths
solaris.device.cdrw,solaris.device.mount.removable,solaris.mail.mailq
solaris.network.autoconf.read,solaris.admin.wusb.read
solaris.smf.manage.vbiosd,solaris.smf.value.vbiosd

権利プロファイルの一覧表示

  • profiles – 現在のユーザーの権利プロファイルを一覧表示します

  • profiles -a – すべての権利プロファイル名を一覧表示します

  • profiles -l – 現在のユーザーの権利プロファイルの完全な定義を一覧表示します

  • profiles usernameusername の権利プロファイルを一覧表示します

  • profiles -x – 認証が必要な現在のユーザーの権利プロファイルを一覧表示します

  • profiles -x username – 認証が必要な username の権利プロファイルを一覧表示します

  • profiles -p profile-name info – 指定された権利プロファイルの内容をプリティプリントで出力します

  • getent prof_attr – ネームサービス内のすべての権利プロファイルの完全な定義を一覧表示します

使用例 56  すべての権利プロファイル名の一覧表示
$ profiles -a
        Console User
        CUPS Administration
        Desktop Removable Media User
...
        VSCAN Management
        WUSB Management
使用例 57  権利プロファイルデータベースの内容の一覧表示
$ getent prof_attr | more
All:::Execute any command as the user or role:help=RtAll.html
Audit Configuration:::Configure Solaris Audit:auths=solaris.smf.value.audit;
help=RtAuditCfg.html
...
Zone Management:::Zones Virtual Application Environment Administration:
help=RtZoneMngmnt.html
Zone Security:::Zones Virtual Application Environment Security:auths=solaris.zone.*,
solaris.auth.delegate;help=RtZoneSecurity.html ...
使用例 58  ユーザーのデフォルト権利プロファイルの一覧表示

権利プロファイルを一覧表示します。デフォルトでは次の権利プロファイルがすべてのユーザーに割り当てられます。

$ profiles
Basic Solaris User
All
使用例 59  初期ユーザーの権利プロファイルの一覧表示

初期ユーザーにはさまざまな権利プロファイルが割り当てられます。

$ profiles Initial user
System Administrator
Audit Review
...
CPU Power Management
Basic Solaris User
All

初期ユーザーのプロファイルに割り当てられているすべてのセキュリティー属性を表示するには、–l オプションを使用します。

$ profiles -l Initial user | more
Initial user:
System Administrator
	profiles=Install Service Management,Audit Review,Extended Accounting 
Flow Management,Extended Accounting Net Management,Extended Accounting Process 
Management,Extended Accounting Task Management,Printer Management,Cron Managem
ent,Device Management,File System Management,Log Management,Mail Management,
Maintenance and Repair,Media Catalog,Name Service Management,Network Management,
Project Management,RAD Management,Service Operator,Shadow Migration Monitor,So
Software Installation,System Configuration,User Management,ZFS Storage Management
          /usr/sbin/gparted          uid=0
Install Service Management
	auths=solaris.autoinstall.service
	profiles=Install Manifest Management,Install Profile Management,
Install Client Management
...
使用例 60  割り当てられている権利プロファイルの内容の一覧表示

初期ユーザーが、Audit Review プロファイルにより付与された権利を一覧表示します。

$ profiles -l
Audit Review
  solaris.audit.read
  
  /usr/sbin/auditreduce  euid=0
  /usr/sbin/auditstat    privs=proc_audit
  /usr/sbin/praudit      privs=file_dac_read
使用例 61  権利プロファイルのコマンドのセキュリティー属性の一覧表示

profiles コマンドのこのバリアントは、ユーザー自身に割り当てられていない権利プロファイル内のコマンドのセキュリティー属性を表示する場合に役立ちます。

最初に、プロファイル内のコマンドを一覧表示します。

% profiles -p "Audit Review" info
	name=Audit Review
	desc=Review Solaris Auditing logs
	help=RtAuditReview.html
	cmd=/usr/sbin/auditreduce
	cmd=/usr/sbin/auditstat
	cmd=/usr/sbin/praudit

次に、プロファイル内の 1 つのコマンドのセキュリティー属性を一覧表示します。

% profiles -p "Audit Review" "select cmd=/usr/sbin/praudit ; info; end;"
select: command is read-only
	id=/usr/sbin/praudit
	privs=file_dac_read
end: command is read-only
使用例 62  最近作成された権利プロファイルの内容の一覧表示

–less オプションは、最近追加された権利プロファイルを最初に表示します。profiles コマンドのこのバリアントは、サイトで権利プロファイルを作成または変更する際に役立ちます。次の出力は、使用例 34で追加されたプロファイルの内容を示しています。通常のユーザーがこのコマンドを実行できます。

$ profiles -la | less
LegacyApp
          /opt/legacy-app/bin/legacy-cmd 
                                     euid=0
OpenLDAP...

役割の一覧表示

  • roles – 現在のユーザーの役割を一覧表示します

  • roles usernameusername の役割を一覧表示します

  • logins -r – 使用可能なすべての役割を一覧表示します

使用例 63  割り当てられている役割の一覧表示

デフォルトでは、root 役割が初期ユーザーに割り当てられます。No roles は、役割が割り当てられないことを示します。

$ roles
root

特権の一覧表示

  • man privileges – 開発者により使用される特権の定義と特権の名前を一覧表示します

  • ppriv -vl – 開発者により使用される特権の定義と特権の名前を一覧表示します

  • ppriv -vl basic – 特権の基本セット内の特権の名前と定義を一覧表示します

  • ppriv $$ – 現在のシェル ($$) 内の特権を一覧表示します

  • getent exec_attr – 権利プロファイル名別にセキュリティー属性 (setuid または特権) を持つすべてのコマンドを一覧表示します

$ getent exec_attr | more
All:solaris:cmd:::*:
Audit Configuration:solaris:cmd:::/usr/sbin/auditconfig:privs=sys_audit
...
Zone Security:solaris:cmd:::/usr/sbin/txzonemgr:uid=0
Zone Security:solaris:cmd:::/usr/sbin/zonecfg:uid=0 ...
使用例 64  すべての特権とその定義の一覧表示

privileges(5) のマニュアルページで説明されている特権フォーマットが開発者によって使用されます。

$ man privileges
Standards, Environments, and Macros                 privileges(5)

NAME
     privileges - process privilege model
...
     The defined privileges are:

     PRIV_CONTRACT_EVENT

         Allow a process to request reliable delivery  of  events
         to an event endpoint.

         Allow a process to include events in the critical  event
         set  term  of  a  template  which  could be generated in
         volume by the user.
...
使用例 65  特権割り当てで使用される特権の一覧表示

ppriv コマンドは、すべての特権の名前を一覧表示します。定義を表示するには –v オプションを使用します。

この特権フォーマットは、useradd, roleaddusermod、および rolemod コマンドを使用してユーザーと役割に特権を割り当てる場合、および profiles コマンドを使用して権利プロファイルに特権を割り当てる場合に使用されます。

$ ppriv -lv | more
contract_event
	Allows a process to request critical events without limitation.
	Allows a process to request reliable delivery of all events on
	any event queue.
...
win_upgrade_sl
        Allows a process to set the sensitivity label of a window
        resource to a sensitivity label that dominates the existing
        sensitivity label.
        This privilege is interpreted only if the system is configured
        with Trusted Extensions.
使用例 66  現在のシェル内の特権の一覧表示

デフォルトでは、どのユーザーにも基本特権セットが割り当てられます。デフォルトの制限セットはすべての特権です。

出力の最初の文字は、次の特権セットを指しています。

E

有効特権セット

I

継承可能な特権セット

P

許可された特権セット

L

制限特権セット

$ ppriv $$
1200:   -bash
flags = <none>
        E: basic
        I: basic
        P: basic
        L: all
$ ppriv -v $$
1200:   -bash
flags = <none>
	E: file_link_any,file_read,file_write,net_access,proc_exec,proc_fork,
           proc_info,proc_session,sys_ib_info
	I: file_link_any,file_read,...,sys_ib_info
	P: file_link_any,file_read,...,sys_ib_info
	L: contract_event,contract_identity,...,sys_time

2 つのドル記号 ($$) により、親シェルのプロセス番号がコマンドに渡されます。この一覧表示には、割り当てられている権利プロファイル内のコマンドに制限されている特権は含まれません。

使用例 67  基本特権とその定義の一覧表示
$ ppriv -vl basic
file_link_any
	Allows a process to create hardlinks to files owned by a uid
	different from the process' effective uid.
file_read
	Allows a process to read objects in the filesystem.
file_write
	Allows a process to modify objects in the filesystem.
net_access
	Allows a process to open a TCP, UDP, SDP or SCTP network endpoint.
proc_exec
	Allows a process to call execve().
proc_fork
	Allows a process to call fork1()/forkall()/vfork()
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.
sys_ib_info
	Allows a process to perform read InfiniBand MAD (Management Datagram)
	operations.
使用例 68  ユーザーの権利プロファイル内のセキュリティー属性を持つコマンドの一覧表示

Basic Solaris User プロファイルには、ユーザーが CD-ROM への読み取りと書き込みを行えるコマンドが含まれています。

$ profiles -l
  Basic Solaris User
...
   /usr/bin/cdrecord.bin   privs=file_dac_read,sys_devices,
     proc_lock_memory,proc_priocntl,net_privaddr
   /usr/bin/readcd.bin     privs=file_dac_read,sys_devices,net_privaddr
   /usr/bin/cdda2wav.bin   privs=file_dac_read,sys_devices,
     proc_priocntl,net_privaddr
  All
   * 

修飾属性の一覧表示

  • man user_attr – セキュリティー属性の修飾子を定義します

  • getent – コマンドが実行されるシステム上の特定のユーザーまたは役割の修飾セキュリティー属性を一覧表示します

  • ldapaddent – 特定のユーザーまたは役割の修飾セキュリティー属性をすべて一覧表示します

使用例 69  このシステム上のユーザーの修飾属性の一覧表示
system1$ getent user_attr | grep jdoe:
jdoe:system1:::profiles=System Administrator
使用例 70  LDAP 内のユーザーの全修飾属性の一覧表示
system1$ ldapaddent -d user_attr | grep ^jdoe:
jdoe:system1:::profiles=System Administrator
jdoe:sysopgroup:::profiles=System Operator