I've installed my computer (Ubuntu 18.04) with an user called 'localadmin'.

Then I've created another user "thomas", which is in group sudo.

If I'am logged in as 'thomas' and a graphical program ask for sudo authentication (e.g. gedit admin:///etc/fstab),I have to enter the password for the user 'localadmin'.

In the terminal, e.g. sudo vi /etc/fstab, the user 'thomas' will be elevated, as expected.

How can I change the graphical ui to ask for the right user for elevating?


  • Good question - I don't think the gvfs admin backend is well documented - it seems to use libpolkit under the hood, so presumably there is some kind of policykit schema that controls this – steeldriver Jun 17 '18 at 12:56
  • ... in fact, I suspect that's the intent of subject.local && subject.active && subject.isInGroup ("sudo")) in the /usr/share/polkit-1/rules.d/org.gtk.vfs.file-operations.rules file. Just to clarify, did you log out and back in after adding thomas to group sudo? – steeldriver Jun 17 '18 at 13:14
  • @steeldriver: Just to clarify, did you log out and back in after adding thomas to group sudo? - Yes i did. – Thomas Schläppi Jun 26 '18 at 6:28
  • I've backed up the entire userhome before installing ubuntu (from scratch), after the install was completed, i've restored the whole userhome. Because i've created the user 'localadmin' before 'thomas' my user id is now 1001 instead of 1000 before the install - is the userid for sudoing in Gui maybe cached somewhere? Thomas – Thomas Schläppi Jun 26 '18 at 6:30
  • Not so far as I know - you did add thomas to the sudo group, right - not as an individual user entry in /etc/sudoers? – steeldriver Jun 26 '18 at 11:40

While groups command showed that the user 'thomas' was in sudo group, the graphical tool 'users and groups' showed no membership.

Adding the user in the 'users and groups' tool solved the issue.

The question why the command line and the gui showed differences is still unanswered.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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