Linux server

How do I reset the root password in Linux
RFLaffertyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
PapertripConnect With a Mentor Commented:
This all assumes you are able to physically reboot the server:

Using GRUB, you can manually edit the proposed menu entry at boot time. To do so, when GRUB is presenting the menu list (you might need to press ESC first), follow those instructions:

    use the arrows to select the boot entry you want to modify.
    press e to edit the entry
    use the arrows to go to kernel line
    press e to edit this entry
    at the end of the line add the word single
    press ESC to go back to the parent menu
    press b to boot this kernel


After booting you will get a prompt without needing a password.  Type 'passwd' and it will change the root password, then just hit ctrl-d and the system will continue booting.
0
 
omarfaridCommented:
as root run passwd command
0
 
RFLaffertyAuthor Commented:
logged in as an account that was created for user
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
omarfaridCommented:
you mean you lost your root password?

which linux platform you run?
0
 
PapertripCommented:
Apologies I left out the 2nd line -- if you can reboot the server, do that, then you will see the grub boot loader menu.

This also assumes you are actually using the grub loader.
0
 
RFLaffertyAuthor Commented:
Thank you so much, Ill try it & let u know
0
 
RFLaffertyAuthor Commented:
Linux version 2.6.31-23-server (buildd@allspice) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) ) #74-Ubuntu SMP Mon Feb 28 22:32:34 UTC 2011
0
 
pilson66Commented:
sudo passwd root
0
 
PapertripCommented:
@omarfarid that link has exactly what I already wrote...
0
 
cyclechipCommented:
simple answer:
press escape during the boot process to enter grub menu
cursor down to 'single user mode'
at the # prompt, type passwd and hit enter:
# passwd
follow the prompts to set a new root password.
0
All Courses

From novice to tech pro — start learning today.