Issues with "SU - userid -c command" on system reboot

Hi All!

My db2 is started in the AIX /etc/inittab on systemreboot as follows
db3:2:once:su - db2inst3 -c db2start >/dev/console 2>1

I changed the .profile of db2inst3 to put an alias to the db2start command as follows
alias db2start="/usr/bin/ksh /home/db2inst3/sample/db2start.ksh"

When I issue db2start logged in as db2inst3, it executes the /home/db2inst3/sample/db2start.ksh startup script but on a system reboot this script is not being executed.

I thought that when you issue "su - userid and execute a command the .profile is executed and the command gets executed as if from db2inst3 user profile. But there seem to be differences. Would appreciate any input on this.

Thanks in advance

When i issue a su <userid> what does it mean swithch user or superuser.

Ex: There are two users say user1 and user2.Now a file is owned by user1 and i want to zip it and i am user2 .When i say su user1 does it make me a superuser or just gives me the permissions to work on the files owned by user1