[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Linux server

How do I reset the root password in Linux
0
RFLafferty
Asked:
RFLafferty
  • 3
  • 3
  • 3
  • +2
1 Solution
 
omarfaridCommented:
as root run passwd command
0
 
RFLaffertyAuthor Commented:
logged in as an account that was created for user
0
 
omarfaridCommented:
you mean you lost your root password?

which linux platform you run?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
PapertripCommented:
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
 
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

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 3
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now