LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Create a shell Script that log in as root (https://www.linuxquestions.org/questions/linux-newbie-8/create-a-shell-script-that-log-in-as-root-432948/)

mashed 04-08-2006 03:22 AM

Create a shell Script that log in as root
 
How can I write a shell script that logs in as root? (and logs out as well).

I need to do this, because the nautilus auto mounting system can't handle video-DVDs correctly, and to mount a DVD by hand you must be logged in as root (as far as I know anyway).

jonaskoelker 04-08-2006 04:13 AM

It sounds like your problem might be solvable by adding a "user" option to the correct device line in /etc/fstab (and perhaps adding such a line).

Otherwise, it sounds like what you want is to create a shell script that does what you want, then use sudo to run that script.

hth --Jonas


All times are GMT -5. The time now is 09:24 PM.