[dundee] Resetting root.

Andrew Clayton dundee at lists.lug.org.uk
Thu Jun 12 18:37:00 2003


On Thu, 2003-06-12 at 15:06, Wm. G. Urquhart wrote:
> Hi All,
> 
> I've got a Sun SPARC running Mandrake7.1 (Hydrogen) and I can't get root 
> access to the machine! When I installed it I set root to a known password. 
> However, the installer said that 9 chars weren't enough so I added a 10th.
> 
> There were no complaints from the installer when I re-entered the password 
> so I assumed that it was ok. How can I reset the password? I can't use a 
> rescue disk as there's no floppy on the system. Or am I screwed and do I 
> need to re-install?

You have several options, including..

>From the SILO boot prompt, typing something like linux single should
take you into single user mode and a root shell. From where you can
mount / (if it's not already) and edit /etc/shadow. Just blank out the
root password. It will be the field with all weird characters. So you
have something like

root::11832:0:99999:7:::

Just remember to reset it when you get back in.



Or boot from the the install media, if it has a rescue option take that,
if not go as for as you need to with the install option until you get a
shell out on ctrl+alt+F[123456] then mount your / and do the same as
above.
 
The first option would be the way to ;)



--
Andrew