LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-08-2006, 04:22 AM   #1
mashed
LQ Newbie
 
Registered: Mar 2006
Location: Finland
Distribution: Fedora Core 5
Posts: 28

Rep: Reputation: 15
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).
 
Old 04-08-2006, 05:13 AM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create log file from script fotoguy Programming 12 03-27-2012 07:39 AM
Script to create a log file satimis Programming 15 01-16-2006 07:39 AM
How to create a shell script that reads something from stdin? ricky_ds Programming 2 05-17-2005 06:06 AM
creating shell script that executes as root regardless of who runs the script? m3kgt Linux - General 13 06-04-2004 11:23 PM
Create CD catalogue using Shell Script Helene Programming 2 04-09-2004 10:42 PM


All times are GMT -5. The time now is 01:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration