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,
the file /etc/passwd.conf only contains comments (all lines start with '#'). 
So I guess some default cipher is in use. Do you know what is the default?
The file is prepared for "md5":

#default:
# localcipher = md5
# ypcipher = old

But md5 seems not the default. Because when I uncomment this and use md5, 
pwhash gives different output. And passwd command will also not work.

If I use passwd -d files the error is a bit different:

###################
passwd: Couldn't generate salt: Invalid argument
passwd: /etc/master.passwd: unchanged
###################
Is there some tool not installed or missing?!?

Again, if I just use passwd command, I get:

###################
Couldn't get salt.
Unable to change auth token: error in service module
###################

I also did the test with pwhash and used vipw to insert this output in passwd 
file. And this worked. The username I used can now login only with password.

I also managed to install the BFFS filesystem on AMIGA side. So here is the 
current /etc/passwd:

#########################
root:*:0:0:Charlie &:/root:/bin/bash
toor:*:0:0:Bourne-again Superuser:/root:/bin/sh
daemon:*:1:1:The devil himself:/:/sbin/nologin
operator:*:2:5:System &:/usr/guest/operator:/sbin/nologin
bin:*:3:7:Binaries Commands and Source:/:/sbin/nologin
games:*:7:13:& pseudo-user:/usr/games:/sbin/nologin
postfix:*:12:12:& pseudo-user:/var/spool/postfix:/sbin/nologin
named:*:14:14:& pseudo-user:/var/chroot/named:/sbin/nologin
ntpd:*:15:15:& pseudo-user:/var/chroot/ntpd:/sbin/nologin
sshd:*:16:16:& pseudo-user:/var/chroot/sshd:/sbin/nologin
_pflogd:*:18:18:& pseudo-user:/var/chroot/pflogd:/sbin/nologin
_rwhod:*:19:19:& pseudo-user:/var/rwho:/sbin/nologin
_proxy:*:21:21:Proxy Services:/nonexistent:/sbin/nologin
_sdpd:*:23:23:& pseudo-user:/nonexistent:/sbin/nologin
uucp:*:66:1:UNIX-to-UNIX Copy:/nonexistent:/sbin/nologin
nobody:*:32767:39:Unprivileged user:/nonexistent:/sbin/nologin
nobby:*:1000:100::/home/nobby:/bin/bash
#########################

Thanks very much for your efforts!
Bye,
Andreas



Am Montag, 2. MÃrz 2009 schrieben Sie:
> Andreas Barth wrote:
> > The passwd file is the default one. I don't know yet how I can manage to
> > post it here, as my NetBSD system is still very basic with no e-mail or
> > other luxury. Just one single console.
>
> This /etc/passwd.conf file is created during installation process. It
> describes the configuration of password cipher. Particurarly interesting
> is localcipher stanza. For some reason passwd fails to encrypt password
> using whatever localcipher is set on your system.
>
> Also, this file is unrelated to /etc/master.passwd and /etc/passwd files
> which contains users definitions, encrypted passwords and stuff like that.
>
> Following command will return configured cipher for local passwords:
> cat /etc/passwd.conf | grep localcipher
>
> > I tried pwhash <some string>, and it will print encrypted data.
>
> Hmmm. So at least password generation stuff it working. Can you try
> using passwd command like that:
> passwd -d files someuser
>
> By default passwd uses pam_passwd module, but using -d files flag will
> skip pam_passwd, and write directly to /etc/master.passwd. So it will
> work if problem lies in pam_passwd.
>
> > Can I as workaround use vipw command to inset this string in passwd file
> > without locking me out off the system?
>
> Yes, as pwhash and passwd uses same mechanism to generate password.
> However I suggest experimenting with non-root account first ;).
>
> Radek




Home | Main Index | Thread Index | Old Index