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 Kubuntu
Bugs, which is subscribed to userconfig in Ubuntu.
https://bugs.launchpad.net/bugs/893842

Title:
  Move "admin" group to "sudo"

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

-- 
kubuntu-bugs mailing list
kubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs

Reply via email to