User commands in root script
Forum: Programming and Scripting
Topic: User commands in root script
started by: Juanito
Posted by Juanito on Mar. 03 2007,09:28Is there a way to execute some commands as user in a script called by root?
For example, in a script that requires to be run as root due to using "modprobe", is there a way to use "mydsl-load" as user?
Posted by roberts on Mar. 03 2007,14:48su dsl mydsl-load ....
Posted by Juanito on Mar. 04 2007,04:05Aaah - thanks (don't recall seeing that anywhere).
Posted by ^thehatsrule^ on Mar. 04 2007,06:23use man su?
Anyways, I think using that way implies -c (the way I'm used to using it)