LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Forgot Root Password & User Name !! (https://www.linuxquestions.org/questions/linux-newbie-8/forgot-root-password-and-user-name-758352/)

bhavyanandan 09-28-2009 09:24 PM

Forgot Root Password & User Name !!
 
Hi Folks :)

Is there any way to recover the Root User name & the password if the end user forget's it :scratch:

Matir 09-28-2009 09:39 PM

You can change the password: just boot into a recovery mode (via livecd, init=/bin/bash, or grub option for many modern distros) and remount root rw, then use passwd to change the password.

mobinskariya 09-28-2009 09:54 PM

this topic has been discussed many times in this forum..just a search will give you the required answer or under his thread you can find similar threads.

eileen123 09-29-2009 04:57 AM

comment
 
Pretty well said..!!
Eileen..:)
========================

eileen123 09-29-2009 04:59 AM

comment
 
Nice thoughts..
Eileen.. :hattip:
============================
online data storage

AngTheo789 09-29-2009 03:50 PM

Recovering the "Root User Name" is a contradiction in terms, as root is always called root. The original question might have been about recovering one or more existing usernames and their passwords.

Logging in a root in rescue mode allows to read the /etc/passwd file, containing all existing usernames. Passwords are usually stored separately in /etc/shadow and are encrypted, so the easiest way to access the account is by changing the password.

Dopamine 09-29-2009 04:15 PM

Quote:

Originally Posted by AngTheo789 (Post 3700915)
Recovering the "Root User Name" is a contradiction in terms, as root is always called root. The original question might have been about recovering one or more existing usernames and their passwords.

Logging in a root in rescue mode allows to read the /etc/passwd file, containing all existing usernames. Passwords are usually stored separately in /etc/shadow and are encrypted, so the easiest way to access the account is by changing the password.

Is there any way to activate rescue mode from a remote location? (im guessing no XD but its worth a shot)

chrism01 09-29-2009 07:35 PM

You can try

telinit 1

which will put the system into single user mode. It may(!) ask for the root user passwd. If you know that then you're fine, although you don't need single user mode in that case; use

su -
<root passwd>

but if its being awkward, try single user.


All times are GMT -5. The time now is 11:40 AM.