Changing root's shell

Erik Norgaard norgaard at
Wed Aug 9 06:40:07 UTC 2006

Ross Penner wrote:
> On 8/8/06, Pete Slagle <freebsd-questions at> wrote:
> I followed your steps but the problem remains. The /etc/passwd file is
> edited but I still can't logon as root. When I changed the shell initially,
> I used chpass. I
> also tried changeing the /etc/master.passwd file to no avail.

As mentioned by others: did you remount the root partition rw? In single 
  user mode it is mounted read-only. 2nd: Did you use vipw, the pw 
command or just vi?

If you can see your changes in the master.passwd file, then you might 
just need to rebuild the db files while still in single-user mode:

   # pwd_mkdb /etc/master.passwd
   # pwd_mkdb -p /etc/master.passwd

If this fails, maybe some strange character sneaked in and building the 
database fails. Then you can recover the original master.passwd from the 
sources, /usr/src/etc/master.passwd, you still have to rebuild the db files.

Cheers, Erik

Ph: +34.666334818                      web:
X.509 Certificate:
Key ID: 69:79:B8:2C:E3:8F:E7:BE:5D:C3:C3:B1:74:62:B8:3F:9F:1F:69:B9

More information about the freebsd-questions mailing list