(iSeries)
Granting authority to a profile using the IBM i command line using wsadmin scripting
To grant authority to objects and directories in a profile, run the grtwasaut command from the Qshell command line.
To run the script...
Tasks
- On the IBM i command line, run the STRQSH (Start Qshell) command.
- On the Qshell command line, use the cd command to change to the directory containing the script:
cd app_server_root/bin- Run the grtwasaut command:
grtwasaut -profileName profile [ -user usrprf | -authlist authlist ] -dtaaut dataAuth -objaut objAuthwhere profile is the profile to which we are granting authority, usrprf is the user profile to which we are granting authority, authlist is the authorization list to which we are granting authority, dataAuth specifies the data authorities that we are granting to the user specified by the -user parameter, and objAuth specifies the object authorities that we are granting to the user specified by the -user parameter. We do not need to specify both the -user and -authlist parameters, but specify at least one of them. For more information on the grtwasaut command and additional parameters, see topics about the grtwasaut command.
Example
In the following example, the user profiles johndoe and jsmith are granted rwx authority to the profile devinst and the associated objects.
grtwasaut -profileName devinst -user "johndoe jsmith" -dtaaut rwx -recursiveIn the following example, the user profiles johndoe and jsmith are granted rwx authority to the installedApps subdirectory and all nested objects in the installedApps subdirectory.
grtwasaut -profileName devinst -object installedApps -user "johndoe jsmith" -dtaaut rwx -recursive
Revoking authority to a profile using the IBM i command line