Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

According to our office Admin rules, developer's machines should not have admin privilege, which i hated so much. so I decided to enable the sudo access with some work around found in web (booting with single user mode). and did it successfully but one strange behaviour which I don’t know why.

1) sudo option works in terminal (like if i install any application through terminal)

2) I cannot open synaptic package manager for which you need admin privilege with my user I am not able to open it.

so my question how my user is administrator while working with terminal but not with xwindow application (gnome or KDE).

Are console and gnome applications using different sudoers file ?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Application permissions (eg, for update) are determined by PolicyKit rather than the sudoers file. I ran up against the same issue and it took a while to work out. Good documentation for this appears to be a bit lacking.

If you look in /etc/polkit-1/localauthority.conf.d there should be a file 51-ubuntu-admin.conf containing:

[Configuration]
AdminIdentities=unix-group:sudo;unix-group:admin

ie, members of the admin or sudo groups will be reported by PolicyKit as having administrator rights.

Either modify the AdminIdentities line in this file to

AdminIdentities=unix-user:YOURUSERNAME;unix-group:sudo;unix-group:admin

or create a new file, eg 52-local-admin.conf containing

[Configuration]
AdminIdentities=unix-user:YOURUSERNAME
share|improve this answer
    
thanks for the answer and also for correcting my grammar mistakes. as you said i created the file called 49-local-admin.conf and replaced with AdminIdentities=unix-user:[my user name] ans restarted the system but still no luck. –  mycholan Oct 19 '12 at 10:07
    
Sounds like I got the priority order wrong. Try moving it to 52-... –  chronitis Oct 19 '12 at 11:06
    
Thanks bro, it is working after changed to 52. –  mycholan Oct 19 '12 at 12:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.