The same user is listed multiple times in authentication dialog

Bug #1042320 reported by Dylan McCall
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
policykit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In some events, the same user can end up being listed twice in authentication dialogs. I believe this has something to do with toggling an account type in the User Accounts settings panel, but I have been unable to reproduce it intentionally. (I have done it by accident on a separate fresh install of Ubuntu 12.04, however). I am attaching a screenshot of the end result.

Revision history for this message
Dylan McCall (dylanmccall) wrote :
Revision history for this message
Glenn Goldie (ggoldie) wrote :
Download full text (3.3 KiB)

[Solved]
I've had this problem in Mint 13 (based on 12.04) as well but I finally tracked down the cause & resolved it tonight.

I only have a single user on my machine. I noticed if I started for example gparted manually with gksudo then I just get prompted for password. If I start gparted from the menu it is called by pkexec (policy kit) and I am prompted to select a user and my (only) user is displayed twice, a duplicate entry. This is different from when clean installed when it behaved the same as the gksudo i.e. password prompt only. I also couldn't remember exactly what had caused this to start happening.

I found these two files that gave me a clue:

/etc/polkit-1/localauthority.conf.d/50-localauthority.conf
[Configuration]
AdminIdentities=unix-user:0

..and

/etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf
[Configuration]
AdminIdentities=unix-group:sudo;unix-group:admin

User 0 is obviously root.
I remembered when tinkering with the /etc/sudoers file I had experimented with group memberships. Sure enough I found my user was listed as a member of both the sudo and the admin groups.

It seems polkit searches both these 'AdminIdentities' groups and since I belonged to both groups I'm assuming that's why I was listed in the pkexec authentication drop-down box twice.

As admin group is now deprecated (see PrecisePangolin release notes snippet below) I simply chose to delete the admin group and logged in again. Problem solved.

I'm sure the problem would also have been solved by simply removing my user from the admin group.

WARNING: You must be certain you understand the contents of /etc/sudoers and your administrative user groups memberships before deleting groups or removing users from such groups. Otherwise you could end up with a system with no users allowed sudo privileges (and no root login I think in Ubuntu systems).

In my case I think I created the admin group myself at some point as there is a %admin group entry in /etc/sudoers by default which is slightly different from the %sudo entry and I was curious about the differences. So for me it was safe enough to just delete the admin group. But if you have been upgrading from prior Ubuntu versions when admin group WAS in use then as I've already warned you'll need to check and be absolutely sure about the current state of how your sudo privileges work.

https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/UbuntuDesktop
Common Infrastructure
Up until Ubuntu 11.10, administrator access using the sudo tool was granted via the "admin" Unix group. In Ubuntu 12.04, administrator access will be granted via the "sudo" group. This makes Ubuntu more consistent with the upstream implementation and Debian. For compatibility purposes, the "admin" group will continue to provide sudo/administrator access in 12.04.

I'm not sure it's exactly a bug. Well yes it is, but an extremely low priority one. It doesn't happen with default install and it's only going to occur if some one creates an admin group and then has users belonging to both sudo and admin groups.

But if someone has an excess of time and is capable of fixing this (I'm not a coder or I would) then perhaps polkit pkex...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in policykit (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.