Possible to Query for Root Password with Shortcuts?
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Possible to Query for Root Password with Shortcuts?
Does anybody know if it is possible to be queried when trying to open up programs that require root permissions to run correctly when trying to launch them from a shortcut on the launcher panel? I was just curious because it has this feature built in for all the administrative things on the menu like configuring network ETC. (Where it asks you for the root password before it launches) Is there any way to pass parameters through a custom launcher that could also do the same thing so I can actually launch programs from the launch panel as opposed to opening a terminal SU'ing and launching it?
Distribution: *buntu - Slackware - Anything on USB
Posts: 254
Rep:
Do you mean to lock people out from using certain applications? Requiring the root password to use, say, Firefox, or some other application, that doesn't normally request the root password?
Do you mean to lock people out from using certain applications? Requiring the root password to use, say, Firefox, or some other application, that doesn't normally request the root password?
Not so much, I have some network tools like a nmap front end that require root access to be fully functional, but I like to launch the nmap front end from a launcher shortcut off the launcher panel on the top of the screen. Is there anyway to have it come up with a dialog box that asks for root access instead, this way I don't have to open a terminal, do a SU, then type the command to launch the GUI. I am really just looking for a way to make it ask me for the root password so I have fully functionality out of the programs that need root access, all while just being able to launch it off the launcher bar
There is the kdesu command (for use with KDE) that prompts to the root password, and then runs the rest of the line as root. Is this the sort of thing you need? (GNOME has a similar command and, I believe, can also run the kdesu command.
kdesu -c <command> works, and gives you the 'nicer' dialog.
su -c <command> also works, and a terminal window pops up (and stays up as long as the command is open) prompting for pw.
there are older strictly gnome variations around:
gnomesu.sf.net
and you might be able to find a dusty gsu (officially 'unreleased' and as valuable as a beatles' basement tape (or not)) around.
or even gksu
but i can't vouch for their veracity.......
EDIT: i've been thinking (careful....), and i tested this myself: if the process you're attempting to create a launcher for can only be run as root, eg. system-config-packages - you can create a launcher using that as the command, and it will prompt you for a pw when you launch it.
however, if the process you wish to launch can be run by both user and root (albeit with different results, eg launching a mail client to retrieve local mail), then you'll have to go with the su routines.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.