[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
Nobody sat down and designed the current behavior. Well, checking admin group membership long predates the advent of polkit. admin group members are still _the_ fundamental definition of an administrator in Ubuntu; sudo, polkit, etc. all define their privileges based on that in their default configuration. So if you created a new group that are admins in the sense of root, but is not called admin, nothing on the desktop will recognize this at first. This includes language selector, but also things like which .desktop files are presented in the desktop and which aren't, then sudo, and a couple of other places which check group memberships. (You already updated your polkit configuration etc. of course, but that's not sufficient for everything). That said, if someone wants to change language-selector to query polkit for com.ubuntu.languageselector.setsystemdefaultlanguage instead of checking the group membership , that would be very welcome. It's one of the few remaining places which still directly uses the groups. ** Summary changed: - [Precise] Language selector won't allow me to install languages + checks admin group membership instead of querying polkit ** Changed in: language-selector (Ubuntu) Status: Confirmed = Triaged -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: checks admin group membership instead of querying polkit To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
Okey, okey, I retreat. ;-) Thanks Thomas and Philipp for the additional input. @Martin: What's you thoughts on this? Should l-s be changed to query policykit instead of checking unix groups? ** Changed in: language-selector (Ubuntu) Status: Incomplete = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
PolicyKit's checks are mooted by line 145 of /usr/lib/python2.7/dist- packages/LanguageSelector/gtk/GtkLanguageSelector.py, which reads simply: 145 self.is_admin = (os.getuid() == 0 or in_grp_sudo or in_grp_admin) Later, on line 192: 192 if self.is_admin: 193 self.setupInstallerTreeView() 194 self.updateLanguageView() Thus the buttons are clickable iff the user launching the utility is in the sudo or admin groups. A quick edit of line 145 to simply read 145 self.is_admin = True #(os.getuid() == 0 or in_grp_sudo or in_grp_admin) ...immediately makes the buttons accessible and semi-functional: I can e.g. select Install / Remove Languages, then click Japanese, then click Apply Changes, and things proceed normally - I get a PolicyKit prompt, give it my password, and get my Japanese support. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
I don't understand what kind of change is needed to address the above observations. The user who is created at a fresh 12.04 installation is initially included in the sudo Unix group, which gives him or her administrative privileges. If other users are made administrators via System Settings - User Accounts (which tool should be used for the purpose), they are added to the sudo Unix group. Since the sudo and admin Unix groups are included in 51-ubuntu- admin.conf by default, there is normally no need to edit that file. @Philipp: Which Unix groups are you included in? You can find out by opening a terminal window and run the groups command. ** Changed in: language-selector (Ubuntu) Status: Triaged = Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
Other users are made 'administrators' via a custom pkla file. [Configuration] AdminIdentities=unix-netgroup:REDACTED_NETGROUP_NAME These users are not in the 'sudo' group, and are not UID 0. antarus@goats4 $ groups eng adm cdrom fuse ops guest ops-perm nonconf mrmagoo corp-kernel goobuntu tracker-users prism-users I am not in the sudo group (my sudo group is empty), but I am a administrator according to polkit. if you are suggesting that we manually add (via the UI) all the administrators for the thousands of machines we run...I don't think that is really a workable solution. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
On 2012-12-13 02:17, Alec Warner wrote: Other users are made 'administrators' via a custom pkla file. How would language-selector know about the existence of such files? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
On 2012-12-13 02:17, Alec Warner wrote: if you are suggesting that we manually add (via the UI) all the administrators for the thousands of machines we run...I don't think that is really a workable solution. Maybe not. But I think it's reasonable to assume that those who grant admin privileges in other ways than via the UI do it in a way that is compatible with how Ubuntu handles these things. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
Gunnar, the point here is that the code is checking the wrong thing. Nobody sat down and designed the current behavior. I believe that, in fact policykit *is* the way Ubuntu handles these things. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
@Gunnar: As I said in the bug report, this is an installation which uses user accounts and groups from an LDAP directory. There is an LDAP group for all network-wide admins, and I am in this group. This group is enabled for sudo and policykit admin rights in the appropriate config files, and I expect all users within this group to have all available permissions. I certainly don't want to edit code files in /usr/lib to give myself additional rights. I also don't want do put all admin users into the local groups sudo or admin, because this defeats the whole purpose of an LDAP directory (i.e., I would have to change files on all machines in the network whenever there is a new admin or one leaves). It is also not an option to distribute the groups sudo and admin via LDAP, because then nothing works on the machine in an emergency when the LDAP server is down (it is generally not recommended to distribute any uids and gids 1000 via LDAP for this reason). You are also wrong about the way that is compatible with how Ubuntu handles these things. Ubuntu uses sudo and policykit, and I am using these ways. Note that language-selector does not need to know about the existence of any files (and should not), it should just ask policykit whether the user has admin rights. That's the way all other applications work (if they don't use sudo). -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
I'm seeing the same problem as Philipp. There's some issue with how Language Selector uses PolicyKit. Adding additional admin identities to local authority doesn't authorize them to set system-wide settings in Language Selector. But adding users to the sudo group works. Here are steps to reproduce: 1. Start with an account (myuser) with no admin privs. (I.e., not in group sudo.) Verify no privs in language selector. Verify that running pkexec id prompts for the root password, not the user password. 2. Create a new group containing the user: - addgroup --system mygroup - adduser myuser mygroup 3. Configure the new group as an admin identity by creating /etc/polkit-1/localauthority.conf.d/60-mygroup.conf with: [Configuration] AdminIdentities=unix-group:mygroup 4. Verify that pkexec id now prompts for the user password rather than root password. This means local authority is now properly configured. 5. Log out and back in again as myuser. Note that the user still doesn't have authorization for language selector. 6. Add the user to group sudo. (adduser myuser sudo). 7. Log out and back in again as myuser. Note that the user now has authorization for lanuage selector. ** Changed in: language-selector (Ubuntu) Status: Invalid = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
** Changed in: language-selector (Ubuntu) Status: Confirmed = Triaged ** Changed in: language-selector (Ubuntu) Importance: Undecided = Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
Ok, so I added the group I am in as an AdminIdentity in this file. However, in the language selector, the relevant buttons are still grayed out. I am very confident that my change to /etc/polkit-1/localauthority.conf.d/ is right, because it actually changed something for the user account administration that is also part of gnome-control-center. Previously this would ask me for the root password, now I am able to unlock the settings there with my own password (or one of the other accounts in the new admin group). So this should work for the language selector, too. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
language-selector does not identify admins via sudo; like most desktop services, it uses policykit instead, which is configured via /etc/polkit-1/localauthorityconf.d. On an Ubuntu system, the desktop administrator groups are defined in /etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf. ** Changed in: language-selector (Ubuntu) Status: Confirmed = Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: language-selector (Ubuntu) Status: New = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1008344] Re: [Precise] Language selector won't allow me to install languages
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1008344 Title: [Precise] Language selector won't allow me to install languages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/1008344/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs