i am trying to do something like this
# Change to the userid user1
su - user1
#Issue the command to change directory and list files
exit #Come out of the user1 to root again
#change to user 2
su - user2
exit #back to root again
#come out of the script
done # Is this needed?
however after executing the script (as root, who is the owner of the file) , it seems to only execute the first line.
(changes to user1).
where am i going wrong. The default shell is Korn (ksh) and permissions are right for root to execute.