Running su scripts from bash scripts
Andrei Smirnov <[email protected]>
| Newsgroups | gmane.org.user-groups.linux.morlug |
|---|---|
| Message-ID | <[email protected]> |
I want to execute these commands in a single script: cd Pictures/2005 mkisofs -r -o tmp/Pictures2005.iso . su cdrecord -v -data dev=0,0,0 tmp/Pictures2005.iso . The problem is that after it gets to su it never continues further with the script. I know there is a way to do it in bash, but I forgot, and the quick look at the reference material did not lead me to any example of this kind. In short, I want to execute a set of super-user commands from within a script. In the simples case, it's ok if the user executing the script is asked to enter the root password. In the best case he'll not have to. Any example of that would be appreciated. Andrei -- --------------------------------------------- Dr. Andrei Smirnov, West Virginia University Dept. of Mechanical and Aerospace Engineering Morgantown WV, 26506-6106 Tel:+1(304)293 3111 x2345, fax:+1(304)2936689 Email: [email protected] http://smirnov.mae.wvu.edu 1024D/5CEDD3E2 ---------------------------------------------