Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I'm building a GUI app that needs to run as a root process. Digging around, I found Mike's "consolehelper" tool. The man page is inadequate and leaves much of the configuration of the pam environment totally uncovered.
Here's what I've done so far:
My App sits in a directory under /usr/sbin/myApp.d
I've created a symlink from /usr/bin/consolehelper to /usr/bin/myApp
I've created an entry in /etc/pam.d called myApp
It's contents are:
#%PAM-1.0
auth sufficient /lib/security/pam_rootok.so
auth required /lib/security/pam_pwdb.so
session optional /lib/security/pam_xauth.so
account required /lib/security/pam_permit.so
I've created an entry in /etc/security/console.apps called myApp
It's contents are:
USER=root
PROGRAM=/usr/sbin/myApp.d/myApp
SESSION=true
FALLBACK=true
However, when I attempt to execute myApp directly from /usr/bin/myApp, I get a window telling me "the exec() call falied" with no further info. Also, I'm not prompted for the password.
If I manually execute "sudo /usr/sbin/myApp.d/myApp" it runs.
Anyone have an idea of what I've missed? Do I need special bits on the real binary?
Unfortunately, I can't always guarantee that gksu or kedsu will be available. In fact, on my FC6 system, gksu isn't even installed. And, since we're not devoted to one desktop or the other, we need something a bit more agnostic (I actually run XFCE). This is why consolehelper seems to fit the bill best. But, I'm not married to it if I can find something that is non-desktop specific.
Have you figured this out? I have the same dilemma, and I am considering PolicyKit. The catch I see now is it limits me to very modern Linux distributions.
I may do that for the short term. A major drag about PolicyKit is it requires a significant amount of development to develop policies and D-BUS services.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.