Recuperar Senha Root Linux

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Contact us (/contact-us) Write For Us (/write-for-us)

(/)

(/)

Recover - Reset forgotten linux


root password
admin Uncategorised 22 March 2013

Introduction
This method of reseting/recovering of lost Linux root password
should work on most of linux distributions. I have tested this
method for couple years already, starting with debian
woody,redhat and suse to ubuntu .

UPDATE:To recover a root password on REDHAT and CentOS


visit a following guide on how to recover a root password on
RHEL 7 Linux (/recover-a-forgotten-root-password-on-redhat-7-
linux-selinux-system).
UPDATE:To recover a root password on Ubuntu visit a following
guide on how to recover a root password on Ubuntu 16.04
Xenial Xerus Linux (/how-to-reset-lost-root-password-on-
ubuntu-16-04-xenial-xerus-linux).

If you run lilo boot loader instead of grub you can use the same
method but with some modi cations on how to edit lilo boot
prompt.

Edit Grub boot menu


options
First you need to get into grub menu options. This menu is
displayed right at the beginning of the boot. If you cannot see
your grub menu options press "ESC' key.
You should get something similar to this:

Now we attempt to edit grub's boot option. Press "e" to edit the
rst grub menu option and navigate to kernel line:

Press "e" key again to edit and remove:

quiet splash

and add:

init=/bin/bash

You may have some di erent boot options but the main part
you need to change/add is init=/bin/bash. You will get
something similar to this:

Press enter:
At this point, we have edited grub boot menu, and we are ready
to boot. Press "b" key to boot.

Remount / and /proc


After successfully boot you will be presented with bash
command prompt:

On some linux systems, you will need to completely mount /


and /proc partitions. To do that, enter following commands:

mount -o remount,rw / mount -o remount,rw /proc

* NOTE: If you are not sure that if your partition is already


mounted RW, run the above command anyway as, otherewise
on some systems you will not be able reset your root password.
If you fail to do so, you get this error displayed on the screen:

passwd: Authentication token lock busy


* NOTE: On some Linux distributions, you will have /proc
mounted already if this is not your case, just run following
command:

mount /proc

reset / recover forgotten


linux root password
To reset a actual root password is now simple as typing :

passwd

Reboot
Before you reboot it is recommended but not compulsory to
run

sync

command. Your job of reseting a linux root password is


accomplished.
ABOUT

LinuxCon g.org team is determined to provide you with simple


to follow Linux tutorials, various tips, tricks and programming
guides as well as with GNU/Linux system administration
tutorials in general to help you to learn Linux faster and use it
with ease.

Any comments, constructive feedback or your involvement


( oss-technical-writer-linuxcon g-org) is welcome.

Contact:

web ( at ) linuxcon g ( dot ) org

WRITE FOR US

LinuxCon g is looking for a technical writer(s) geared towards


GNU/Linux and FLOSS technologies. Your articles will feature
various GNU/Linux con guration tutorials and FLOSS
technologies used in combination with GNU/Linux operating
system.

When writing your articles you will be expected to be able to


keep up with a technological advancement regarding the above
mentioned technical area of expertise. You will work
independently and be able to produce at minimum 2 technical
articles a month.

Read More... (/ oss-technical-writer-linuxcon g-org)

FEATURED LINUX TUTORIALS

Bash scripting Tutorial (/bash-scripting-tutorial)


Howto mount USB drive in Linux (/howto-mount-usb-drive-
in-linux)
How to install Skype on Ubuntu 16.04 Xenial Xerus Linux 64-
bit (/how-to-install-skype-on-ubuntu-16-04-xenial-xerus-
linux-64-bit)
How to check CentOS version (/how-to-check-centos-
version)
How to install Steam on Ubuntu 16.04 Xenial Xerus (/how-to-
install-steam-on-ubuntu-16-04-xenial-xerus)
Check what Debian version you are running on your Linux
system (/check-what-debian-version-you-are-running-on-
your-linux-system)
How to stop/start and disable/enable Firewall on Redhat 7
Linux system (/how-to-stop-start-and-disable-enable-
rewall-on-redhat-7-linux-system)
How to setup and use FTP Server in Ubuntu Linux (/how-to-
setup-and-use-ftp-server-in-ubuntu-linux)
How to mount partition with ntfs le system and read write
access (/how-to-mount-partition-with-ntfs- le-system-and-
read-write-access)
How to install the latest Nvidia drivers on Ubuntu 16.04
Xenial Xerus (/how-to-install-the-latest-nvidia-drivers-on-
ubuntu-16-04-xenial-xerus)

Master Your Audio From The CLI With FFMPEG (/master-


your-audio-from-the-cli-with- mpeg)
Master Your Videos From The CLI With FFMPEG (/master-
your-videos-from-the-cli-with- mpeg)

RSS FEEDS

LinuxCon g.org's category RSS list:

System Administration (https://linuxcon g.org/index.php?


format=feed&id=19&option=com_content&type=rss&view=category)
Programming & Scripting (https://linuxcon g.org/index.php?
format=feed&id=17&option=com_content&type=rss&view=category)
Ubuntu (https://linuxcon g.org/index.php?
format=feed&id=8&option=com_content&type=rss&view=category)
CentOS (https://linuxcon g.org/index.php?
format=feed&id=10&option=com_content&type=rss&view=category)
Debian (https://linuxcon g.org/index.php?
format=feed&id=13&option=com_content&type=rss&view=category)
Fedora (https://linuxcon g.org/index.php?
format=feed&id=15&option=com_content&type=rss&view=category)
Redhat (https://linuxcon g.org/index.php?
format=feed&id=14&option=com_content&type=rss&view=category)

2007 - 2017 LinuxCon g.org

Twitter (https://twitter.com/linuxcon g)

You might also like