change root password problem single user boot ( Freebsd 5.2.1 )

change root password problem single user boot ( Freebsd 5.2.1 )

Post by Andre » Wed, 29 Sep 2004 08:17:15


Freebsd 5.2.1

I got locked out of root , ( normal login tells me root account expired).

If I boot in single user mode and I try to change root password i get this
error:

#passwd root
pwd_mkdb: 0 > max uid value (4294967295)
pwd_mkdb: at line #2
pwd_mkdb: /etc/pw.7BUxbZ Inappropriate file type or format
passwd: pam_chauthtok(): error in service module

what does /etc/pw.7BUxbZ mean ?
the number after the dot (7BUxbZ) is different every time i run passwd.

is there a fix for this ? help please !
 
 
 

change root password problem single user boot ( Freebsd 5.2.1 )

Post by james » Wed, 29 Sep 2004 12:08:55


i take it this is the same problem mentioned in a previous post?

use vipw and add:
root::0:0:root:/root:/bin/sh

or.. if your /etc/passwd file is intact you can copy it over top of
master.passwd then run vipw to remove the * in the password section and save
(:wq) to rebuild the password database. reboot to test or just run "passwd
root" to reset root's password

 
 
 

change root password problem single user boot ( Freebsd 5.2.1 )

Post by jpd » Wed, 29 Sep 2004 17:47:37


[snip]

It is a temporary file with a randomly generated string as part of the
filename. Please note that you're not on DOS and that `file extentions'
are meaningless in this context. pwd_mkdb complains about the contents
of the file, not the name.



I'll refer to ObOtherPost for that.


--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
 
 
 

change root password problem single user boot ( Freebsd 5.2.1 )

Post by per » Thu, 30 Sep 2004 15:29:11

In article <4158d456$0$449$ XXXX@XXXXX.COM > "james <at>
hal-pc.org" writes:


No, don't do that!


Nor that!

/etc/passwd and /etc/master.passwd do *not* have the same format - see
passwd(5).

--Per Hedeland
XXXX@XXXXX.COM
 
 
 

change root password problem single user boot ( Freebsd 5.2.1 )

Post by bv » Sun, 03 Oct 2004 23:15:01


/etc/passwd and /etc/master.passwd have a differing number of
fields. If you copy over the line from /etc/passwd
after the :0:0: you need to add :0:0: so that it
looks like

root::0:0::0:0:/root:/bin/sh

Otherwise vipw should complain loudly.

Bill

--
Bill Vermillion - bv @ wjv . com