Bug 907 - pwconv hangs
Summary: pwconv hangs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils
Version: 5.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 5.9
Assignee: Peter Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 807971
TreeView+ depends on / blocked
 
Reported: 1999-01-21 12:01 UTC by stone
Modified: 2018-11-26 17:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-02 10:49:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description stone 1999-01-21 12:01:49 UTC
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 20:37:59 UTC
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 11:00:20 UTC
The man page of pwconv says:
~~
BUGS
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?

Thanks
Subin

Comment 3 RHEL Program Management 2012-04-02 10:24:42 UTC
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 10:49:05 UTC
this issue was fixed in one of the previous shadow-utils releases.

wrabco:/home/pvrabec/rhel-git/shadow-utils/rhel-5.9/shadow-4.0.17/src
# 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

wrabco:/home/pvrabec/rhel-git/shadow-utils/rhel-5.9/shadow-4.0.17/src
# stat /etc/shadow
stat: cannot stat `/etc/shadow': No such file or directory

wrabco:/home/pvrabec/rhel-git/shadow-utils/rhel-5.9/shadow-4.0.17/src
# ./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
pulse:x:15432:0:99999:7:::
nfsnobody:x:15432:0:99999:7:::


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