Run AIX/VIOS Command with padmin/root Privileges in VIO Server
mhhaque 2700012HF4 Comment (1) Visits (26733)
Login as user padmin into VIO server:
Now you can run any AIX command at the padmin console without jumping to root as below:
$ print “ lsvg –l rootvg”| oem_setup_env
$ print "lsattr -El hdisk3" | oem_setup_env
To gain root access on VIO server:
Now you will get the root credentials (without even been asked for a password).
You run lsmap -all VIOS command as below:
root@viosrv1# /usr/ios/cli/ioscli lsmap -all
By default the ioscli commands are not available for the root user. All ioscli commands are in fact calls of /usr/ios/cli/ioscli with the command as argument. So you can use all ioscli commands as user root by appending /usr/ios/cli/ioscli in front of the command.
You can set an alias as below:
root@viosrv1# alias vios
root@viosrv1# vios lsmap -all
Note: You can copy all the alias VIOS command from padmin shell profile file and put it in the root user shell profile file. Then you can run lsmap –all as root user as like as padmin user.