LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-29-2007, 01:35 PM   #1
tim914
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37

Rep: Reputation: 15
Question Any "consolehelper' pros out there?


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?

Thanks

Tim

Last edited by tim914; 05-29-2007 at 01:37 PM.
 
Old 05-29-2007, 02:20 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I'm not a programmer, but why not setup your application to call gksu when launched ? you said you were writing a GUI app, not a console based app.

http://www.nongnu.org/gksu/

Just a thought, since this is the method most of the system management applications use these days.
 
Old 05-29-2007, 02:31 PM   #3
tim914
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37

Original Poster
Rep: Reputation: 15
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.

Tim
 
Old 12-30-2008, 07:57 PM   #4
ahz
Member
 
Registered: Oct 2004
Posts: 58

Rep: Reputation: 15
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.
 
Old 12-30-2008, 08:06 PM   #5
tim914
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ USA
Distribution: Most of them :-)
Posts: 37

Original Poster
Rep: Reputation: 15
Nope - I've resorted to checking the "id" of the user and posting a dialog telling them that they must either sudo or run as root.

Tim
 
Old 12-31-2008, 08:14 AM   #6
ahz
Member
 
Registered: Oct 2004
Posts: 58

Rep: Reputation: 15
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.
 
  


Reply

Tags
as, root



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
Need a "Pros" help with drive partitions dsptech Linux - General 6 06-06-2005 09:28 PM
help regarding consolehelper + userhelper echo77 Linux - Software 0 12-07-2004 03:15 AM
Consolehelper dosn't work anymore! fuzzyash Linux - General 2 08-26-2003 10:05 AM
consolehelper help ckjackson Linux - Security 0 07-24-2003 11:47 AM
consolehelper corrupted alanlq Linux - Software 0 02-19-2003 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:48 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
Open Source Consulting | Domain Registration