[Bug 893842] Re: Move "admin" group to "sudo"

Krzysztof Klimonda kklimonda at syntaxhighlighted.com
Thu Feb 9 21:29:05 UTC 2012


I can confirm that command-not-found 0.2.46ubuntu2 on my precise system (clean install) is still broken.
The problem is this line::
self.user_can_sudo = grp.getgrnam("admin")[2] in posix.getgroups() or grp.getgrnam("sudo")[2] in posix.getgroups()
on clean systems there is no admin group, so first grp.getgrnam("admin") raises KeyError which is then catched and self.user_can_sude is set to False without checking if user is in sudo group.
As mentioned by mc3man in #24 changing the order of grp.getgrnam will fix that because sudo group is always there (and if user is not part of it, admin group will be checked)

** Changed in: command-not-found (Ubuntu Precise)
       Status: Incomplete => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to command-not-found in Ubuntu.
https://bugs.launchpad.net/bugs/893842

Title:
  Move "admin" group to "sudo"

Status in “accountsservice” package in Ubuntu:
  Fix Released
Status in “command-not-found” package in Ubuntu:
  Triaged
Status in “jockey” package in Ubuntu:
  Fix Released
Status in “language-selector” package in Ubuntu:
  Fix Released
Status in “policykit-1” package in Ubuntu:
  Fix Released
Status in “policykit-desktop-privileges” package in Ubuntu:
  Fix Released
Status in “userconfig” package in Ubuntu:
  Fix Released
Status in “accountsservice” source package in Precise:
  Fix Released
Status in “command-not-found” source package in Precise:
  Triaged
Status in “jockey” source package in Precise:
  Fix Released
Status in “language-selector” source package in Precise:
  Fix Released
Status in “policykit-1” source package in Precise:
  Fix Released
Status in “policykit-desktop-privileges” source package in Precise:
  Fix Released
Status in “userconfig” source package in Precise:
  Fix Released

Bug description:
  Fresh install from daily today, am unable to do many common admin actions, the 'root' password is requested
  Attached orig /etc/group

  TEST CASE:
  1. Install Ubuntu Desktop, reboot and login
  2. Click on the user indicator and select 'User Accounts'
  3. On the dialog, click on 'Unlock'

  EXPECTED RESULT
  A authentication dialog is displayed asking for the user's password

  WHAT HAPPENS
  The user is prompted for the root password

  WORKAROUND
  Open a terminal and run the following command:
  $ sudo adduser <your_user_name> admin
  logout and login

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: ubiquity 2.9.4
  ProcVersionSignature: Ubuntu 3.1.0-2.3-generic 3.1.0
  Uname: Linux 3.1.0-2-generic i686
  ApportVersion: 1.26-0ubuntu1
  Architecture: i386
  Date: Tue Nov 22 20:56:50 2011
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha i386 (20111122)
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: ubiquity
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/893842/+subscriptions




More information about the foundations-bugs mailing list