Bug 907 - pwconv hangs
pwconv hangs
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils (Show other bugs)
All Linux
medium Severity medium
: ---
: 5.9
Assigned To: Peter Vrabec
BaseOS QE Security Team
: Reopened
Depends On:
Blocks: 807971
  Show dependency treegraph
Reported: 1999-01-21 07:01 EST by stone
Modified: 2012-04-12 10:34 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-02 06:49:05 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 stone 1999-01-21 07:01:49 EST
pwconv hangs in an infinite loop if there are more
than one user with the same name in the unconverted
passwd file
Comment 1 Preston Brown 1999-03-22 15:37:59 EST
When you say "same name", do you mean same Full Name (ie Preston Brown
for instance) or username (pbrown)?  If it is username, this is
undefined behaviour anyway -- you should never be able to have the
same username in the passwd file.  If the first situation is the case
(full name) please reopen the bug with additional information.
Comment 2 Subin Francis 2012-03-12 07:00:20 EDT
The man page of pwconv says:
Errors in the password or group files (such as invalid or duplicate entries)
may cause these programs to loop forever or fail in other strange ways. Please
run pwck and grpck to correct any such errors before converting to or from
shadow passwords or groups.
I know it is not normal for passwd file to have two users with same user name
(can happen when some one manually edit the file), but my argument is that the
tool should not hang is a loop forever in such a situation. Rather than pwconv
hanging in a loop forever, it would be better to throw some error saying
"passwd file has some invalid entries, please run pwck to clean up your data".
Would it be possible to fix pwconv?

Comment 3 RHEL Product and Program Management 2012-04-02 06:24:42 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 4 Peter Vrabec 2012-04-02 06:49:05 EDT
this issue was fixed in one of the previous shadow-utils releases.

# grep -E "nfsnobody|pulse" /etc/passwd
pulse:x:998:996:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
pulse:x:998:996:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin

# stat /etc/shadow
stat: cannot stat `/etc/shadow': No such file or directory

# ./pwconv 
configuration error - unknown item 'SYS_UID_MIN' (notify administrator)
configuration error - unknown item 'SYS_UID_MAX' (notify administrator)
configuration error - unknown item 'SYS_GID_MIN' (notify administrator)
configuration error - unknown item 'SYS_GID_MAX' (notify administrator)

# grep -E "nfsnobody|pulse" /etc/shadow

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