LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices



Reply
 
Search this Thread
Old 07-26-2005, 11:09 PM   #1
subquantum
LQ Newbie
 
Registered: Jan 2005
Posts: 2

Rep: Reputation: 0
Run a .desktop as root without password prompt


I'm setting up a Mandrake 10 computer for my grandmother. Unfortunately she's stuck with dialup - but fortunately her Dialup ISP supports linux and I got their client up and running. There's only one problem - in order to talk to the modem, the shell script that runs the dialer client must be run as root, as well as running ifdown to actually hang up. Now, as it is I have the desktop shortcut set to Run as Root - but this prompts me for a password. (It's in KDE.) I've made the root password nothing, but it still asks. I'de rather not make my grandmother have to click through a bunch of root login screens to sign on and off - so far I only can think of three options - none of which I know the feasability of.

1) Somehow make the desktop icon automatically provide the root password. I'de make a shortcut to ifdown ppp0 as well using the same idea so there'd be no confusion.

2) Modify the shell script that runs the client to SU in as root first, and again somehow provide the password, and then make a shell script for ifdown to do the same thing.

3) (This is a last resort kinda thing, I'm well aware of the security risks) Autologin as root - which they dont directly allow you to do, but that's probably passable if one knows what file to edit.

If anyone has any ideas on solving any of these solutions, or if you have another of your own I'de be very, very happy to hear it.
 
Old 07-26-2005, 11:43 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Install sudo and make the desktop icon run "sudo <command>". Sudo can be configured to work without a password. This way, no accidental commands will be run as root, but root access can still be granted without a password.
 
Old 08-01-2005, 12:00 AM   #3
subquantum
LQ Newbie
 
Registered: Jan 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks. I was kinda pressed for time, and made a slightly more hasty decision where I used Mandrake's config settings to not require a password to run something as root... So she's still technically logged in as a normal user. I know that it would normally be a not-good thing, but I'm 100% certain that my Grandmother won't be playing with the command line, and the odds of her getting a virus or something through dialup the way she uses it are slim to none... and they really have little to destroy that can't be fixed. But again, thanks for the reply.
 
Old 08-01-2005, 12:38 AM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
And, of course, any virus she's likely to get is not likely to run under a linux environment.
 
  


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
My Knoppix 3.7 need root password when I run program AskMe Linux - Software 5 04-15-2005 06:35 AM
run program as root / password prompt acidjuice Linux - Software 6 03-15-2005 11:33 PM
prompt for root password and passing to a program ludeKing Programming 4 08-23-2004 09:55 PM
Root Password Prompt Greyed Out !!! lionking_x Linux - Software 2 04-08-2004 11:05 AM
no password prompt after root login taboo Linux - General 1 12-22-2003 02:01 PM


All times are GMT -5. The time now is 08:04 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration