Red Hat Bugzilla – Bug 74072
at commands run as wrong user
Last modified: 2007-04-18 12:46:43 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513
Description of problem:
If I run a batch command from an account that I did an su - to, the command runs
as the user that I first logged into as.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Log in as user1
2.su - user2
3.Run a command via batch.
Actual Results: Mail is sent to user1 instead of to user2
Expected Results: Mail should have been sent to user2
batch is using getlogin(3) ro get the delivery address instead of using getuid
and then getpwuid.
Reproduced also with at_3.1.8-11.
This is at's documented behavior in its man page.