Weird problem with non-root user

Todd C. Miller Todd.Miller at
Wed Aug 23 11:14:06 EDT 2000

In message <87EA450621E2D211B6EE0000F8CD295704BDEA2A at>
	so spake "Chhaya, Harshal" (hchhaya):

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

Sudo does not do that, nor do I think it should.  I would certainly
find it much less useful if that were the case.

> 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.

Sudo does not set $HOME to the target user unless you give it the
-H flag.

 - todd

More information about the sudo-users mailing list