ナビゲーションリンクをスキップ | |
印刷ビューの終了 | |
マニュアルページセクション 1: ユーザーコマンド Oracle Solaris 11.1 Information Library (日本語) |
- ユーザーまたは役割に付与された属性値の出力
userattr [-v] attribute_name [user]
userattr コマンドは、属性 attribute_name で最初に見つかった値を標準出力に出力します。ユーザーが指定されていない場合、ユーザーはプロセスの実際のユーザー ID から取得されます。属性名は、user_attr(4) および prof_attr(4) で定義されている中で見つかるものになります。ユーザーにプロファイルが割り当てられている場合は、profiles(1) コマンドを使用します。ユーザーに承認が割り当てられている場合は、auths(1) コマンドを使用します。検索の順序は、ユーザーの user_attr エントリのあとにユーザーのプロファイルが続きます。
属性 attribute_name がユーザーに割り当てられていない場合にエラーが発生すると、userattr は 0 以外の終了コードを返します。それ以外の場合、userattr は 0 の終了コードを返します。
-v オプションを使用すると、属性が見つかった場所が追加で出力されます。
例 1 userattr の使用
example% userattr lock_after_retries root no
/etc/user_attr
/etc/security/policy.conf
/etc/security/prof_attr
次の終了ステータスが返されます。
正常終了。
エラーが発生した。
属性についての詳細は、マニュアルページの attributes(5) を参照してください。
|
終了コードは「確実」です。-v オプションの出力は「非インタフェース」です。
auths(1), profiles(1), policy.conf(4), prof_attr(4), user_attr(4), attributes(5)