[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Login and Password



On 25/11/99 Woodrow Lovett wrote:

>Last year I loaded Debians on my box, but because of problems connecting
>to the internet to complete the installation and the upcoming planting
>season it has just been sitting there used. I returned to complete the
>installation,but I can not get into the system. It will not accept the
>login and password. They could be incorrect. Is there any way to get into
>the system to change the Login and password. this box is in my home,
>and there is a single user.
>


I assume you use i386 and LILO..

reboot and type linux single at the LILO boot: prompt (it only stays for 2
or 3 seconds so you have to be quick, hold down shift if you have problems
getting it to appear) that will probably get you a prompt saying enter root
password for maintenance, if it still rejects your root password there then
reboot again and enter linux init=/bin/sh that will certainly drop you into
a root shell with no passwords required, then:

# mount -o remount,rw /
# mount -o ro /usr
# passwd root
 and enter a new root password, then (important!):

# sync
# sync
# sync
# umount /usr
# mount -o remount,ro /
# sync
and try to run /sbin/reboot which may not work (we have no init running) if
not and you are sure you umounted the filesystems (run sync a few more
times for good measure) you can hit control alt delete the next reboot
should let you login as root using the passwd you supplied

alternatively (and perhaps safer) use vi to remove the password from
/etc/passwd (or /etc/shadow if you enabled shadow passwds) so you have
root::0:0 .... instead of trying to run the passwd command.  if you do this
skip the steps about mounting /usr



Ethan Benson
To obtain my PGP key: http://www.alaska.net/~erbenson/pgp/


Reply to: