How to rescue/change password in RHEL6 under VirtualBox?
Hello,
I am new here from Asia. Its good to be here and like to ask question on RHEL 6 I installed RHEL 6 on Virtual box and second time when I started the Virtual box I forgot whats the username and password for RHEL 6. I searched on this form for resetting password and username like--- going to single mode and typing passwd for changing password.. Its not helping, it shows me blank after I type "passwd" or "passwd root" or "passwd username" I am damn confused about this.. Any suggestions or method to get back the password and username back.. Thank you! |
Can't you log in as root (after a normal boot)?
If not: After you start in single usermode you are root and can do the following: - Use cat /etc/passwd to show all users, which should also show the one you forgot. - Use passwd username to set a new password. - reboot into normal mode (init 6) |
Hello,
thanks for the reply but its not working. It says "no such directory" What I did - Edit - kernel - then typed - single or 1 then - b - then - now i am in Single user mode - #- I typed your options - but nothing works- cat /etc/passwd (it says no such directory) - for passwd username - then enter - it shows blank space- then I have to boot it forcefully. Thanks! Quote:
|
You didn't answer my question: Can't you log in as root (after a normal boot)?
There's no need to go into single usermode when you can log in as root. Quote:
- boot, - press a key when grub appears, - press e to edit (I assume that there is only one entry present, if more are present select the appropriate one), - select kernel /vmlinuz-2.... line, - press e to edit - add single as last entry, - press enter, - press b - system boots and there should not be any error messages. You are now in single user mode as root user (no password is asked on RHEL systems) and have a bash shell. From this point on you should be able to use normal commands (like cat or passwd): Code:
cat /etc/passwd Code:
ls -l /etc/passwd* Code:
-rw-r--r--. 1 root root 1111 Jul 21 10:25 /etc/passwd |
Hi,
Thanks for the reply. I am new to this so I got confused what I did, I reinstall everything with default settings and now its OK. Thank you! BTW can you tell me where to look for Linux system administrative tutorials. . Quote:
|
Quote:
BTW: Can you put up the [SOLVED] tag. - above the first post -> Please Mark this thread as solved if you feel a solution has been provided. - -or- - - first post -> Thread Tools -> Mark this thread as solved Quote:
- 50 UNIX / Linux Sysadmin Tutorials (thegeekstuff) Maybe one of my blogs could also help you (not just admin specific): Resources / References / Useful links |
Done as you said. Mark this thread as solved.
And I am looking for the exact tutorials for the courses that will qualify me to the Linux system administrative exam. Will those blogs or links help me? One more thing what is (Exams EX200 and EX300)? Thank you! Quote:
|
Quote:
- RHCSA / EX200 - Exam objectives After getting RHCSA you can do: - RHCE / EX300 - Exam objectives Red Hat doesn't care how you complete the tasks they give you as long as you complete (most of) them within the short time given. You can use any source while preparing for it. So my resource list could come in handy. A more dedicated source would be this book: RHCSA/RHCE Red Hat Linux Certification Study Guide BTW: These 2 certificates are based on showing practical knowledge you should already have learned over the years. Getting these certificates by cramming for the test over a short period of time is rather pointless. It will be obvious that you don't have the practical experience that should accompany these certificates. |
All times are GMT -5. The time now is 09:01 PM. |