Checks the current user session for an authorization.
ckauth [-A] { AuthName [,AuthName] ... }
The ckauth command determines whether the process that the ckauth command is invoked in has the authorizations specified by the AuthName parameter. The command is used in shell scripts that need to check for authorizations. With the ckauth command, you can specify a single authorization or multiple authorizations through a comma-separated list. The ckauth command returns 0 when the calling process has any of the listed authorizations. If you specify the -A option, the ckauth command returns 0 when the calling process has all of the listed authorizations. A nonzero value is returned for failures.
Item | Description |
---|---|
-A | Checks whether the calling process has all of the listed authorizations. |
$ ckauth aix.fs.manage
$ echo $?
0
$ ckauth -A aix.security.user,aix.security.group
$ echo $?
0