Sudo for web_app

From: Schumacher, Mike (HAL)
Sent: Friday, March 02, 2012 10:26 AM
To: Bojja, Sridhar (HAL Contractor)
Cc: Augustine, Anila (HAL); Hofsetz, Therron (HAL); Bobroff, Harold (HAL)
Subject: sudo webapp on haldevjbs01

Sridhar,

I found the issues for using sudo to the webapp account. You need to run the following command in order to become the webapp user.
"sudo -u webapp /bin/bash" then enter your passwd. If you are in your home directory you will get a permissions error like the one below.

[szb@haldevjbs01 ~]$ sudo -u webapp /bin/bash
bash: /home/szb/.bashrc: Permission denied

That is because the user webapp doesn't have write permissions in your home directory but you are now user webapp. Just cd out of your home directory. If you want to make sure your now webapp type "id" on the command line.

Thanks-

Mike Schumacher

Leave a Reply