The situation: In my job I often have to su
to other userIDs, which means I lose my settings from my .profile
- to restore them, I have to manually source my profile.
Isn't there a way to automate this? If there was an option to specify an alternative login script, I could put it into an alias along the lines of:
alias myksh='sudo -u someuser ksh --alt-profile /path/to/my/profile'