Root Password location

wattcom

Newbie
Hi All

so i changed the root password but have forgotten it i can access my box VIA Winscp as i saved the password in the connection setting does anyone no the location so i can change it with out doing a flash.

Thanks
 
the file is named passwd in /etc/

Have you got a backup of it with a blank password? If not I can sort you one out.
It's not a simple text file that you can just edit. It can be done but I can't remember how offhand. It's easier to just copy a new file over.


EDIT: I googled it lol

If you open the passwd file with notepad++ you have to edit the line that begins 'root'


It should looks something like this:


root:x:0:0:root:/root:/bin/bash


Delete the "x" after "root:". It's important to leave the colons.

You may have to reboot but next time you telnet in you will have a blank password.
Create a new one by typing passwd
 
Last edited:
the file is named passwd in /etc/

Have you got a backup of it with a blank password? If not I can sort you one out.
It's not a simple text file that you can just edit. It can be done but I can't remember how offhand. It's easier to just copy a new file over.


EDIT: I googled it lol

If you open the passwd file with notepad++ you have to edit the line that begins 'root'


It should looks something like this:


root:x:0:0:root:/root:/bin/bash


Delete the "x" after "root:". It's important to leave the colons.

You may have to reboot but next time you telnet in you will have a blank password.
Create a new one by typing passwd
Thanks will give that a go

Sent from my ONEPLUS A3003 using Tapatalk

the file is named passwd in /etc/

Have you got a backup of it with a blank password? If not I can sort you one out.
It's not a simple text file that you can just edit. It can be done but I can't remember how offhand. It's easier to just copy a new file over.


EDIT: I googled it lol

If you open the passwd file with notepad++ you have to edit the line that begins 'root'


It should looks something like this:


root:x:0:0:root:/root:/bin/bash


Delete the "x" after "root:". It's important to leave the colons.

You may have to reboot but next time you telnet in you will have a blank password.
Create a new one by typing passwd
Thanks will give that a go

Sent from my ONEPLUS A3003 using Tapatalk
All sorted thanks all

Sent from my ONEPLUS A3003 using Tapatalk
 
Hi guys am i right in saying it should look like this
root::0:0:root:/root:/bin/bash

Sent from my SM-G935F using Tapatalk
 
you might also need to edit the /etc/shadow file.

I advise against editing both passwd and shadow file though, if you edit them in a windows editor it could add control characters that mess more things up.
 
you might also need to edit the /etc/shadow file.

I advise against editing both passwd and shadow file though, if you edit them in a windows editor it could add control characters that mess more things up.
I've got a h2 that is password locked any help would be great
 
Back
Top