Bug 506764 - KeyError: 'getpwuid(): uid not found on system using NIS
KeyError: 'getpwuid(): uid not found on system using NIS
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-06-18 11:40 EDT by Michael Ploujnikov
Modified: 2014-01-21 18:10 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-18 12:35:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michael Ploujnikov 2009-06-18 11:40:57 EDT
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 12:35:34 EDT
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-29 21:38:34 EDT
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 12:45:14 EDT
yum-3.2.24-2.fc10 has been submitted as an update for Fedora 10.
Comment 4 Fedora Update System 2009-11-04 07:05:58 EST
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.