tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: getpwent and duplicate names in /etc/master.passwd

On 24.06.2012 20:26, Joerg Sonnenberger wrote:
> Hi all,
> while looking at the code for getpwent, I stumbled across an
> inconsistency in the behavior of pwd_mkdb. If /etc/master.passwd
> contains a duplicate name (e.g. two lines for root), this is preserved
> in spwd.db, but not in /etc/passwd. Is there any reason for such
> behavior? Should pwd_mkdb reject installing the password file in first
> place?

I think it should reject the creation.

How can it happen in the first place unless by tweaking master.passwd by
hand anyway? This should be discouraged...

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index