sudo / user - profile question

Todd C. Miller Todd.Miller at
Tue Feb 15 15:49:03 EST 2000

In message <85256886.0071B173.00 at>
	so spake  (forgettee):

> Quick sudo question...
> How can I get the .profile to source automatically when a user sudos to anoth
> er
> user?
> The example below doesn't cause the .profile to execute.
> sudo -H -u user2 /usr/bin/ksh

Ksh only source .profile if the shell name starts with a '-' or
the -l option is given, so:
    sudo -H -u user2 /usr/bin/ksh -l
should do the trick.

 - todd

More information about the sudo-users mailing list