sourcing users's .profile

DietrichT at DietrichT at
Tue Mar 19 13:32:46 EST 2002

Me three!!!
I've been tossing this one around for a while now trying to figure out an
easier way to do this.
So far, I've written some short scripts that first source in the .profile
and then execute the shell command.  I have the end-user sudo to that
script instead of directly to the shell, but I'd prefer a more direct
approach in the sudo command itself where I can source in the target user's
profile and invoke a shell.
So count me in on the "wish" list!!!

Tim Dietrich
Security Administrator
Schneider National, Inc.
920-592-2080 (phone)
920-403-8595 (fax)

                    Hannigan             To:     Ken M Simpson <Ken.Simpson at>                             
                    <mlh at       cc:     sudo-users <sudo-users at>                                   
                    u>                   Fax to:                                                                   
                    Sent by:             Subject:     Re: sourcing users's .profile                                
                    in at                                                                                     
                    07:32 PM                                                                                       

Ken M Simpson wrote:
> Has anyone figured out a "clean" method of sourcing the user's .profile
> (and /etc/profile) when running "sudo -s" under solaris 2.x (2.8  in my
> case) ?  There are a number of references to this problem in the sudo
> mailing list but none of them seem to have an answer. One could run
> "sudo su - uid" but that seems messy to me,  it defeat s the purpose of
> using sudo, which is to improve on "su".
> ???

"me too"  :-)    Todd, does sudo have a wishlist or todo list?

sudo-users mailing list <sudo-users at>
For list information, options, or to unsubscribe, visit:

More information about the sudo-users mailing list