run a command as another user!!
Is there anyway to run a command as another user so my script can keep going ?
instead of su - oraweb owsctl stop exit |
isn't exit going to quit the script regardless?
|
The script stop after i issue the su - oraweb then if i manualy enter Exit.. the script continue after
|
I suspect you might want the screen command... allows some program to work after the konsole has closed?
|
All i want is to run that sort of script but the script stop after the su - oraweb goes in... won't do anything unless i do exit manualy
#!/bin/sh su - oraweb owsctl stop owsctl stop -nodemgr exit kill -9 `pgrep oraweb` su - oraweb owsctl start -nodemgr & owsctl start |
so i need some sort of owsctl stop runas oraweb <-- so i dont need to su - oraweb
|
How about "sudo -u oraweb owsctl stop"? You can use /etc/sudoers to specify users that may invoke that command without being prompted for a password.
|
Ill try but i dont need to enter password at all ... i just need to change use to do that command and come back to root to kill all oraweb process
thanks |
All times are GMT -5. The time now is 04:10 AM. |