run a script as root
Posted on 2002-07-11
We would like to call a script from within a C program that runs a bash script as the root user. The script has functions like "init q" and "fuser" to reset a serial port from one mode (respawn)to another (off). We have the root password available to use, but not sure the best way to run the bash script as root, short of running an expect script to answer the password question.