![]() |
Switch User
I need to switch users while performing a task, I am trying to do this with the following:
:
echo "pass" | sudo -u user | lsHowever I can't seem to escape the prompt for the password, is there a way for this prompt not show up? |
Re: Switch User
The /etc/sudoers file dictates who is allowed to sudo to what account.
When setup up correctly: :
sudo su - <someusername>If you set up so that you or whoever is running the script can sudo then the script will run without a passwoird prompt. |
Re: Switch User
Quote:
|
| All times are GMT -5. The time now is 9:18 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC