Bug 506764 - KeyError: 'getpwuid(): uid not found on system using NIS
Summary: KeyError: 'getpwuid(): uid not found on system using NIS
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-06-18 15:40 UTC by Michael Ploujnikov
Modified: 2014-01-21 23:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-06-18 16:35:34 UTC
Type: ---

Attachments (Terms of Use)

Description Michael Ploujnikov 2009-06-18 15:40:57 UTC
Description of problem:
Running 'yum verify' crashes with an error about some UID not being found.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. $ yum verify
Actual results:
$ yum verify
Loaded plugins: fastestmirror, presto, refresh-packagekit, security, verify
/usr/lib/python2.6/site-packages/yum/packages.py:1484: DeprecationWarning: os.popen3 is deprecated.  Use the subprocess module.
  (ig, fp,er) = os.popen3([prelink_cmd, "-y", fn])
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 352, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/lib/yum-plugins/verify.py", line 355, in doCommand
    self.show_data(base, msg, ypl.installed, 'Installed Packages')
  File "/usr/lib/yum-plugins/verify.py", line 285, in show_data
    for (pkg, results) in self.filter_data(msg, pkgs):
  File "/usr/lib/yum-plugins/verify.py", line 206, in filter_data
    oresults = pkg.verify(patterns=self._filename_globs, all=self.all)
  File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1389, in verify
    my_user  = pwd.getpwuid(my_st[stat.ST_UID])[0]
KeyError: 'getpwuid(): uid not found: 492'

yum does not continue after this point.

Expected results:
I expect yum to handle the missing uid gracefully and continue verifying the files as usual.

Additional info:
My system is connected to a corporate NIS server with ypbind.

Comment 1 seth vidal 2009-06-18 16:35:34 UTC
Catching the exception with this commit


feel free to apply it and test, but I'm pretty sure it works.

Comment 2 Fedora Update System 2009-09-30 01:38:34 UTC
yum-3.2.24-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2009-10-19 16:45:14 UTC
yum-3.2.24-2.fc10 has been submitted as an update for Fedora 10.

Comment 4 Fedora Update System 2009-11-04 12:05:58 UTC
yum-3.2.24-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.