Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Need Help From An Expert!, HELP!!!
post Dec 3 2003, 06:35 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 3-December 03
Member No.: 1,899

I need help from someone who really knows what they are doing!!!! I have recently gotten a linux box and have somehow changed the root password, and am stuck with only a user with no privliges. Neither my cd-rom or my floppy disk are mounted right now... so how can I get my passwords back. Help please!!!
Please e-mail me back at
Go to the top of the page
+Quote Post
post Dec 3 2003, 07:19 PM
Post #2


Group: Members
Posts: 95
Joined: 2-December 02
Member No.: 213

Okay... I just tried this on my system, and it should work. You're going to need a bootable distro of linux (ie the install CD for your distro, maybe), and you're also going to need to know what partition linux is installed on (/dev/hdxn, where x is a letter (probably a) and n is a number. You can get this by taking a look at your fstab file. There should be something like the following
/dev/hda3  /  ....

But it won't necessarily start with /dev/hda3. What you're looking for is the line with just the / in the second column (your root partition).
Once you've booted from your bootable linux distro, login as root. Mount your root partition:
mount /dev/hda3 /mnt

Then backup your current /etc/passwd file, the one for the bootable distro, and copy yours to the position of the one for the bootable distro:
mv /etc/passwd /etc/passwd.backup
mv /mnt/etc/passwd /mnt/etc/passwd.backup
cp /mnt/etc/passwd.backup /etc/passwd

Then change the password for root:
passwd root

It will ask you to change for the new password. If it says its too weak, make a new one OR just type it in again to use it. Now, copy the passwd file back to your distro:
mv /etc/passwd /mnt/etc/passwd

Reboot into your installed distro. If all went well you should be able to login with the password you just changed it to. I can't guarantee that this will work on your system, but it worked on mine. Hope this helps.


Windows XP; Debian 3.0r2 (Woody)
Shuttle AK32 Mobo w/ Athlon XP 1700+ @ 266 FSB
GeForce 4 mx440 64mb
Turtle Beach Santa Cruz 5.1 Surround Sound
Seagate 80gb, Western Digital 40gb
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 24th June 2018 - 12:37 AM