|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple User Shell Script
I would like to make a shell script that will be run as root.
This shell script will su into various users and then run commands as them. sudo won't work. eg: su username1 runcommand sleep 5 exit su username2 runcommoand sleep 5 exit . : Any help is greatly appreciated. |
|
#2
|
||||
|
||||
|
Quote:
__________________
~James [Not currently seeking freelance work] Like philosophy or interested in spirituality? Philosophorum. Game Dev Experts Forums Foresight Linux - Because your desktop should be cool! Linux FAQ FedoraFAQ UbuntuGuide |
|
#3
|
|||
|
|||
|
Do a man on the su command. You'll want to use "su -c".
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums. |
|
#4
|
|||
|
|||
|
Thanks for your help stdnbar! That worked great!!
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Multiple User Shell Script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|