Add new comment

I tested on my system with a '/usr/bin/sleep 60' as a test user

 

testuser   14627  7980  0 15:02 pts/1    00:00:00 /usr/bin/sleep 60

 

and the slave also reports the user:

2013-10-25 15:02:29.551990 :: Received /usr/bin/sleep 60 as user testuser(5142)

The slave suprocess is getting passed the environment from your current environment, so when you "echo $USER", it's reporting the user from the current environment. See what happens when you change the command to whoami"whoami", which actually checks your UID.

Another option is to use:

"/bin/bash -l -c 'echo $USER'"

-Dave

By dave

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
secret-login