LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-08-2007, 07:53 PM   #1
damonj
LQ Newbie
 
Registered: Jul 2007
Posts: 6

Rep: Reputation: 1
Question Run as root from icon


Hi guys and gals. I've been skirting these forums for a while and have obtained many useful tips.

I'm doing my very best to leave M$ behind and embrace Linux, and I'm finding that it's not nearly as difficult as I feared it would be.

I've reached something of a stumbling block with one little script.

In Windows I used an application Called Demon tools to mounts ISO files as drives. In Linux the standard mount command works great. However I'm essentially a very lazy person and so want to make it easier on myself.

I've written a very simple script

Code:
#bin/bash
mount -o loop "$1" "/media/VCDROM"
The idea being that I can drop the ISO file onto the ICON of the script and have it conveniently mounted in the VCDROM folder.

There’s a problem. Only root can use mount.

I've played with su and sudo but it seems that each need the password entered and so makes my plans useless.

Can anyone offer any advice?
Is there away to allow a normal user to use mount?

Any help greatly appreciated.
 
Old 08-08-2007, 08:32 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Update the sudoers file to not require the password for the mount command.
The manpage tells you how.
 
Old 08-09-2007, 12:17 AM   #3
damonj
LQ Newbie
 
Registered: Jul 2007
Posts: 6

Original Poster
Rep: Reputation: 1
man pages weren't actually very helpful. They showed me how to use the command but not how to set it up. I edited the sudoers file and got it working.

Thanks for the tip.
 
Old 08-09-2007, 12:26 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Sorry - try "man sudoers" rather than "man sudo"
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why lftp command run failed when user isn't root, but ok when logining as root steven_yu Linux - Software 0 06-06-2007 08:36 PM
Is a script, run at boot time from init.d, run with root authority? tmbrwolf53 Linux - Server 2 03-31-2007 08:15 PM
configuring desktop icon to run a program with wine tybaldchina Linux - Software 3 01-17-2006 12:18 AM
Root Icon Problem. novkhan Linux - Newbie 5 06-04-2004 01:41 PM
Icon with root privaleges squabsy Linux - General 2 03-01-2004 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration