Breaking password on FreeBSD 5.2.1 box
Daan Vreeken [PA4DAN]
Danovitsch at vitsch.net
Sat Nov 27 02:55:05 PST 2004
On Thursday 25 November 2004 15:22, Andrew Lewis wrote:
> Hi list,
>
> We have a client running a fBSD 5.2.1 box that needed its root password
> hacked.
>
> I couldn't boot into single user mode w/o the root password, so I
> installed fBSD 5.3 on another machine, and slaved the drive from the
> 5.2.1 box in mine.
>
> Then I tried editting its master.passwd file and removing the root
> password: didn't work.
>
> So then I tried setting it to the hash of a password I knew: didn't
> work.
After you have changed /etc/master.passwd, you have to run pwd_mkdb to
generate the new password database. If you have the second disk mounted
on /mnt, try this after changing the hashes :
pwd_mkdb -d /mnt/etc /mnt/etc/master.passwd
> So then I editted /etc/ttys and set 'secure', booted up in single user
> mode, ran 'passwd' and it came back with some failure in pam_chauthtok -
> I forget the exact message, but it wasn't any more specific than what
> I've described.
That's probably passwd failing because the root filesystem is mounted
read-only in single user mode. Try "mount -a" before you start passwd.
> What to do now? Did I do something very wrong? :( Please CC your
> response to me (non-subscriber)...
>
> Thanks...
>
> Best,
> -AL.
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list