Port-amiga archive

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

Re: new NetBSD user dummy questions - change root password problem



Hi Radek,
root user still did not have any password installed.
When I run this as normal user, it printed a '*'.

But ok. If I look at the source of pw_getpwconf() I conclude, that the 
function has a problem if the "key" for pw_getconf() can not be found in 
the /etc/passwd.conf file. pw_getpwconf() will not return the config 
for "default" as the last resort.
So I tried to add the key "root" in /etc/passwd.conf. And suddenly, I can use 
passwd command to change password for root.
Yes, somehow this is a bug. But I can not imagine, that this should be a 
general bug. It is so obvious and easy to observe and should be known 
already, if it would be so general.
If you run NetBSD/amiga, can you reproduce this on your machine with NetBSD 
4.0.1 on 68060 CPU and an empty passwd.conf file?
Bye,
Andreas




Am Samstag, 7. MÃrz 2009 schrieben Sie:
> Supernobby wrote:
> > current pass for root (uid 0):
>
> Was this empty, or did you erase output before sending mail? For root it
> should print encoded current password, and for other users "*".
>
> > --------------- trying with pw_getpwconf --------------
> > localcipher:
> > key:
> > pw_gensalt returned: -1
> > salt:
> > crypted foobar: ..Tgnr41TuFZA
> > --------------- trying with pw_getconf --------------
> > localcipher: old
> > key: old
> > pw_gensalt returned: 0
> > salt: Jt
> > crypted foobar: Jt46rjnTMybIU
> > ###########################
> > This is run as root. If I run this as normal usr, it gives same output
> > for the relevant lines in pw_getpwconf section.
> >
> > Is there somewhere a good documentation for pw_getpwconf() function,
> > where I could read about what could go wrong?
>
> I don't think it's documented. There's a manpage for pw_getconf but not
> for pw_getpwconf. Basically, pw_getpwconf tries to determine what cipher
> should be used, depending on various account related informations.
>
> In case you're interested, these functions are implemented in following
> source file:
> src/lib/libutil/passwd.c
> ( http://opengrok.netbsd.org/source/xref/lib/libutil/passwd.c )
>
> > But maybe you know?
>
> Not really, NetBSD devs should look into it. This is almost certainly a
> bug.
>
> Please submit problem report using send-pr utility, or web interface:
> http://www.netbsd.org/cgi-bin/sendpr.cgi?gndb=netbsd
>
> Don't forget to attach results of our research.
>
> Regards
> Radek




Home | Main Index | Thread Index | Old Index