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



Hello Radek,
Your guess was correct.
Here the output of your test program:
###########################
current pass for root (uid 0): 
--------------- 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?
But maybe you know? Thank you very much.
Bye,
Andreas



Am Mittwoch, 4. MÃrz 2009 schrieben Sie:
> Supernobby wrote:
> > the file /etc/passwd.conf only contains comments (all lines start with
> > '#').
>
> That's fine.
>
> > So I guess some default cipher is in use. Do you know what is the
> > default?
>
> AFAIR default localcipher and ypcipher is "old" (original crypt(3)).
>
> > And passwd command will also not work.
>
> I suspect that pw_getpwconf or pw_gensalt system functions are failing
> somehow. Please try running quick test program I just wrote:
> http://c0ff33.net/gensalt_test.c
>
> Put this file onto your NetBSD parition, then compile and run:
>
> # cc -lutil -lcrypt -o gensalt_test ./gensalt_test.c
> # ./gensalt_test
>
> Try running this program from root account, and from unprivileged
> account, but change your current root password into something bogus (as
> it prints encoded current password if ran from root). Paste outputs from
> this program here. It should look somewhat like this:
> http://c0ff33.net/gensalt_test.txt
>
> Regards
> Radek




Home | Main Index | Thread Index | Old Index