System Administration Guide, Volume 2

How to Assume Role-Based Access Control

To assume a role, use the su command. You cannot log in to a role. For example:


%su my-role
Password: my-role-password
#

To use commands in the profile, simply type into a shell. For example:


# lpadmin -p myprinter options

The lpadmin command is executed with any process attributes, special UIDs or GIDs, that have been assigned to the lpadmin command in profiles for the role assumed.