VIOS Commands, What's Behind
One should never work as root on VIO servers. Login as user padmin and type
$oem_setup_env
you get the root credentials (password not required). Checking /etc/passwd we found that padmin uses a *restricted* K shell:
padmin:!:10:1::/home/padmin:/usr/bin/rksh
Upon checking the vios amin user padmin's .profile, the true nature of vios commands reveals…
Nature
A segment of /home/padmin/.profile
export PATH=/usr/ios/cli:/usr/ios/utils:/usr/ios/lpm/bin:/usr/ios/oem:/usr/ios/ldw/bin:$HOME if [ $LOGNAME = "padmin" ] then ioscli license -swma fi export SHELL=/usr/bin/ksh alias backup="ioscli backup" alias restore="ioscli restore" alias chbdsp="ioscli chbdsp" alias mvbdsp="ioscli mvbdsp" alias rmsp="ioscli rmsp" alias mkrep="ioscli mkrep" alias chrep="ioscli chrep" alias lsrep="ioscli lsrep" alias rmrep="ioscli rmrep" alias mkvopt="ioscli mkvopt" alias chvopt="ioscli chvopt" alias rmvopt="ioscli rmvopt" alias loadopt="ioscli loadopt" ...
Made a guess, and we run vios commands as root instead of padmin:
/usr/ios/cli/ioscli lsmap -all
By setting aliases and PATH one can use vios commands easily on root.
Furthermore, to reveal what AIX command is behind the padmin command we can change the debug level:
$export CLI_DEBUG=33
Try some vios commands, extra info will be shown:
$ioslevel AIX: "cat /usr/ios/cli/ios.level " 2.2.0.0

Discussion
Well, I actually have done some brutal toying on my VIOSs. This is added to my .zshrc:
That enables me staying at root and can do *MOST* padmin ioscli commands