Posted 25.05.2007 | Updated 25.05.2007 | Contributed by Andy Mallett
Although FreeBSD is a very secure operating system in itself, it is possible to get into the system without a password and then to gain root access.
Why would one want to do this? Well I have had to perform this funtion for a number of Unix students who have forgotten their root passwords. Not that I've ever forgotten my root password myself, oh, no, no, no.
Start the FreeBSD system. At the Welcome to FreeBSD! boot menu, press Option 4 to Boot into Single User Mode
When prompted, enter full pathname of your preferred shell or press ENTER for the default /bin/sh
You will be immediately dropped into a single user mode without a root password.
Mount the / file system in read and write mode with the mount command, by typing the following two commands..
mount -u /
mount -a
Set up a new password with passwd command..
passwd root
Finally reboot the system. Done. Scary eh? Too easy. Makes you think doesn't it! Time to lock that server up somewhere safe..
|
|