Exporting UNIX command lists

To export an indexed command list for UNIX sessions from the command line, use the following syntax:

FindSessions /i=”InstallationName” /export=”UnixCommand” /path=”folder

For example, to export the indexed command for the sessions associated with a specific computer and save the output in the C:\Temp\UNIX folder, you would type a command like this:

FindSessions /i=”MyInstallation” /machine=”rhes-63”
/export=”UnixCommand” /path=”C:\Temp\UNIX”

The command generates the list of commands as comma-separated values in a text file. For example:

"Time","Command","Role","Ticket"
"10/9/2014 3:12:14 PM","/bin/bash ","<None>","<None>"
"10/9/2014 3:12:19 PM","adflush","<None>","<None>"
"10/9/2014 3:12:23 PM","su -","<None>","<None>"
"10/9/2014 3:12:27 PM","Password: ","<None>","<None>"
"10/9/2014 3:12:30 PM","adflush","<None>","<None>"
"10/9/2014 4:26:14 PM", "exit","<None>","<None>"

Searching for sessions by role or trouble-ticket information

When you use the /export=UnixCommand option, you can also use the command line options /role and /ticket to export sessions based on specific role or trouble-ticket information.

Use /role to specify search criteria based on one or more privilege elevation service roles. You can specify multiple roles separated by semicolons (;). For example, add /role="db_backup/zonename;mail_admin/zonename" to the command line to search for UNIX sessions that were run using the db_backup or mail_admin role.

When you search for sessions by role name, be sure to include the zone name. Otherwise, FindSessions doesn’t return the sessions and instead displays the message, “No session is selected to be exported”.

FindSessions /i=”MyInstallation” /export=”UnixCommand”
/role=”db_backup/zonename;mail_admin/zonename” /path=”C:\Temp\UNIX”

You can use the /ticket option to specify search criteria based on the trouble-ticket information if you have configured in the dzcheck script to collect this information. You can specify multiple tickets separated by semicolons (;). For example, add /ticket="ticket 1;ticket 2" to the command line to search for sessions ticket1 or ticket2 were specified.

You cannot use wildcards to search for role names or ticket information. If you specify both the /role and /ticket options, FindSessions returns the sessions that match both the specified roles and the specified trouble-ticket information. For information about configuring the dzcheck script and how to capture trouble-ticket information, see the Administrator’s Guide for Linux and UNIX.