HELP. forgot root password

Regarding the pervious post on how to change root password if forgotten was unhelpful. I went to /etc/passwd file. But when I opened it I was unable to edit/change anything, it was only RO. I am the only user on this machine.

Everything Linux 1798 This topic was started by ,



data/avatar/default/avatar22.webp

6 Posts
Location -
Joined 2004-12-01
Regarding the pervious post on how to change root password if forgotten was unhelpful. I went to /etc/passwd file. But when I opened it I was unable to edit/change anything, it was only RO. I am the only user on this machine. I did find the
root:x:....... where I am suppose to delete the X as it tells that the password is shadow, but I was unable to edit it.
 
Is there another way. I really cannot offord to loss any documents on this machine.

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic



data/avatar/default/avatar22.webp

2 Posts
Location -
Joined 2004-12-01
Yes, there is a way to reset root password. Give me some more information so I can tell you what to do... Such as what version of linux... what kernal version and are you using grub boot loader or lilo.


data/avatar/default/avatar01.webp

120 Posts
Location -
Joined 2004-03-23
evening koppaspider
 
Obviously you have some sort of Live-CD you can boot from. After booting the Live-CD just mount your harddrive with write-privileges and proceed with the usual "reset root password"-procedure (editing /etc/passwd and /etc/shadow).
 
In case read/write-access isn't available via the context menu, just open a console and mount the drive "manually" ("user@box# mount -t ext3 /dev/hda1 /mnt/hda1"; just replace "ext3" with the filesystem the partition that contains the /etc-folder has, and replace "hda1" with the proper handle of the partition)
 
That should do the trick.


data/avatar/default/avatar22.webp

6 Posts
Location -
Joined 2004-12-01
OP
I have no live-cd. I am the only user on this machine and forgot my root password.
 
I have a Linux Fedora Core 2
Kernal version: 2.6.5-1.358 on an i686
 
and I am using gnu grup boot loader. any suggestions.
HELP!!!!!!!


data/avatar/default/avatar22.webp

6 Posts
Location -
Joined 2004-12-01
OP
I can log into the system fine. I did not forget my login password, but I did forget my root. I tired accessing the etc/shadow directory, but was unsuccessful.
 
I see a lot of examples of changing root by LILO but not that many or not that many clearly described by GRUB, which is what I have.
 
Any suggestions.. ;(


data/avatar/default/avatar03.webp

134 Posts
Location -
Joined 2004-07-27
With the regular password you can still get on the internet - just not as root right? Just get on and download and burn a bootable linux cd - then boot up - mount your hard drive and voila. I find its easiest to just get a small linux version that fits on a floppy disk, and then just mount the hard drive once its loaded up. Then go
cd etc
vi passwd
change it - remove x's
I think you have to
vi shadow
also but I don't remember as I havn't ever had to try recovering it.


data/avatar/default/avatar22.webp

6 Posts
Location -
Joined 2004-12-01
OP
I can not connect that linux box to the internet. Is there a way I can change my root password without using any bootable cd. ??


data/avatar/default/avatar22.webp

6 Posts
Location -
Joined 2004-12-01
OP
I GOT THE SOLUTION. THANKS FOR EVERYONES HELP. I FIND SOMETHIGN ONLINE THAT MIGHT BE INTERESTING TO SOMEONE.
 
4.4 Losing Your Root Password
If for some reason you lose your root password you can change it by following these steps:
 
1) Reboot your machine.
 
2) From GNOME, log out, and choose the reboot option. Or from the login screen, click 'System' then 'Reboot'. From console mode, press Ctrl-Atl-Del (which in Linux reboots the system in a controlled fashion). You will see the shutdown sequence begin.
 
3) Allow the system to reboot to the GRUB splash screen, and then press "e". Select the line containing "kernel", and press "e" again. GRUB will display the line in edit mode.
 
4) Add "single" to the end of the line, and press return. GRUB will return you to the previous screen.
 
5) Press "b" to boot the system into what will now be single user mode. The system will come part of the way up, and then drop you into a root shell - the prompt will look like this: sh-2.05# _
 
6) Type "passwd" and press return. The system will ask you for a new password. Type in your new password, then to retype it as confirmation (it will not display on the screen). If the two entries do not match, it will ask you to try again. It will also warn you if it thinks the password is too obvious; you can ignore the warning, but if you are on a computer that either isn't behind a firewall or is in a public area, this is not recommended.
 
7) Once the new password is in place, type "exit" and press return to allow the system to finish booting. Passwords should be something you can remember without writing down, but not something anyone else could figure out. Dictionary words and passwords that are all numbers are not recommended. Subtle misspellings, funny capitalizations (Linux is case sensitive), and substituting numbers or special characters for letters make good passwords. For instance, the first letters of the words in a phrase can work, too. Some good examples are:
 
BaceBawl
fOOdfiGHt
p@ssw3rd
 
With the new MD5 password security, passwords are no longer limited to eight characters as in older versions of UNIX. The limit is on your own memory, typing accuracy, and patience.
Important: Please remember to change the default root password as soon as you become acqainted with your system.
 
 


data/avatar/default/avatar08.webp

1 Posts
Location -
Joined 2005-07-04
Hi, Linuxfun
 
Thanks for you arising the question and finding out the answer, it just solved my problem --- I installed Fedora 4 but forget input root password.
 
But I also contribute some here, you need to set pwd here, just direct go to edit shadow, delete harshed pwd there. Then reboot,
root pwd will be nothing.
 
Have fun.