On Tue, Mar 25, 2008 at 11:33:48PM -0400, John R Puhalski wrote: > > I believe this was discussed once but can I change root password using > the installation CD? I have an old computer that's been sitting around > for some time with Slackware 12.0 on it and I don't know the password. > I was going to give it to my son to use but I cant log on.
boot cd to command line
# Make a directory to mount into, make a new dir to prevent mounting
# over something the boot cd wants
mkdir /foo
# Mount your hard drive
mount /dev/yourharddrive /foo
# chroot (ie, act like we booted into the hard drive)
chroot /foo
# Change password
passwd
# Exit the chroot
exit
# unmount hard drive
umount /foo
ta-daa.
Alternately:
Boot off hard drive.
interrupt boot (capslock in lilo, 'e' to edit boot line in grub)
Boot image + "init=/bin/bash"
In lilo: 'vmlinux init=/bin/bash' (where 'vmlinux' = what you named
it)
In grub: 'e' to edit, then add 'init=/bin/bash'
# Let it boot, you'll have a root shell.
# Remount drive r/w
mount / -o remount,rw
# Change password
passwd
# Remount r/o to make it happy
mount / -o remount,ro
# reboot
reboot
-m
--
Mike Kershaw/Dragorn <[EMAIL PROTECTED]>
GPG Fingerprint: 3546 89DF 3C9D ED80 3381 A661 D7B2 8822 738B BDB1
Todays lesson is always to ignore your feelings and listen to the robot head.
pgpLMDb06yJWq.pgp
Description: PGP signature
_______________________________________________ Mid-Hudson Valley Linux Users Group http://mhvlug.org http://mhvlug.org/cgi-bin/mailman/listinfo/mhvlug Upcoming Meetings (6pm - 8pm) MHVLS Auditorium Mar 5 - Wearable Linux Computing Apr 2 - Building a Kernel the Debian / Ubuntu way May 7 - Setting up a platform-independent home/small office network using Linux Jun 4 - TBD Jul 2 - KVM (Tenative)
