« With Virtualization, Nothing Compares to Power | Main | Migrate When the Time is Right »

October 13, 2009


TrackBack URL for this entry:

Listed below are links to weblogs that reference Changing the padmin .profile:


It did!!... it made me very happy!!!... since I spent a lot of time deploying solutions using many VIOS for many IBM customers...
Thanks a lot!

Maybe I am a naughty admin but I enabled root login and augmented the root .profile with the contents of the padmin .profile and my preferred customizations (PS1 and set -o vi). I can now ssh to root run ioscli commands as root and never login as padmin. I hope the VIO Police don't get me.

I also like to add an alias called 'aix' for the lengthy command oem_setup_env - I run the command 'aix' and it's much faster to type.

I add this line to /home/padmin/.profile
alias aix="oem_setup_env"

I suppose you could add it in .kshrc instead.

If it is just 'set -o vi', then another option is to add EDITOR=vi to /etc/environment.

I put oem_setup_env in the profile also:

export ENV=/home/padmin/.kshrc

and in .kshrc:
PS1="VIO3 # "
set -o vi
export PATH=$PATH:/usr/ios/cli
alias psef='ps -ef | grep -i $1'

alias backup="ioscli backup"
alias restore="ioscli restore"
alias chbdsp="ioscli chbdsp"

Now after logging in as padmin, I'm placed into oem_setup_env and can run everything as root.

I am happy with the following settings for user padmin. root will inherit the setting so nothing has to be configured for root. Of course you can extend the "id" logic to create special parts for the user root.

switch to root and extend the padmin .profile

echo '. $HOME/.profile.padmin' >> /home/padmin/.profile

#Create padmin profile. Survives updates ??
cat ./profile.padmin
#### root/padmin base settings on VIO servers
export PATH=$PATH
export ENV=$HOME/.kshrc
# get the machine for the prompt
export NODE=$(hostname )
# ignore CRTL-D when in login shell
set -o ignoreeof
set -o emacs

**** Create .kshrc for padmin
cat .kshrc
# Prompt
# set a prompt that shows the return code of the last command,
# the machine name, the current directory and the command history count
if id >/dev/null 2>&1 ; then
export USER=root
export PS1='($?)$USER@$NODE:$PWD
!$ '
# Extend alias list
alias aix="oem_setup_env"

Logout and login again and you should see something like:


cheers and thx to the former poster

It's good to know whether you're logged in in the padmin restricted shell or the full root access via oem_setup_env.

Mark Chandler from Sydney has a post on this in his new AIXplode blog.

I have been working with this as well and what I have done is to just setup PS1, PS2 and PS3 varibles in padmin's .kshrc file (although) you could probably also set it up in /etc/profile so that it is the default ones used, ( VIOS updates will overwrite the .profile used by padmin, question is will it also over write /etc/profile. I also add EDITOR=vi to /etc/environment file so that I don't have to run set -o vi or place it in the .kshrc file. Another note at least with VIOS 2.2 having variables that are set by running a command need to have full path set or it will return errors.

Hello Friends,

I am Amey working on AIX technology,

I am working on VIO Server restoration.

I have setup like,
VIO server running managed by HMC.

I want to restore VIO server with VIO Clients on another P series frame which is also managed by another HMC.

I have gone through the Redbook, but did not get clear process.

Could any one help me on this, Plsssss

Thank You in advcance :)

A quick way to access oem_setup_env is to type :
r o
as padmin, which will recall the last command beginning by a o

Of course, will not work if the command is not oem_setup_env, but this is usually the case :)

Hi Rob,

Need information regarding APAR implementation on VIOS .

when i use oem_setup_env

i will get the root prompt and my AIX level would be aix 6100-04 TL. It has a sendmail apar which needs to be fixed and ftp vulnerability , if a run LSSECFIX on it . My question is 6100-04 TL is already support scope stoped . How we can get the apar fixed for this vios , is their any work around , or do we have to update the AIX version to the latest TL on the VIOS , even if we upgrade the VIOS to the latest LEVEL . Still the UNDERLYING AIX version won't get update to the latest AIX version. So how to UPDATE the PENDING APARS for those VIOS server in which AIX level not supported by IBM


But AIX level is 6100-04 (IBM stopped supporting this version)

Kindly advice APAR update on the mentioned level . (Best practice to implement APAR , since we need to become root to implement the APAR . And we are facing this issue like AIX level is out of support ) Kindly ADVICE.

The comments to this entry are closed.