Weird problem with non-root user

Chhaya, Harshal hchhaya at ti.com
Wed Aug 23 10:40:55 EDT 2000


I think the problem was because I assumed sudo would change to the target
users directory before executing the command.

The script was looking for some config files in ~user2 but was being
executed from ~user1. It never found the config files and hung as a result.
I modified the script to use full paths for the config and log files and it
now works fine.

I don't understand why

[user1 at host]% sudo -u user2 echo $HOME 

displays /home/user1

Shouldn't it be /home/user2?

I have probably mis-understood how sudo works.

Regards,
Harshal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/sudo-users/attachments/20000823/357e2ae8/attachment.html>


More information about the sudo-users mailing list