close
» » Reset the password for ROOT or any user in Linux Mint

Reset the password for ROOT or any user in Linux Mint

System

Reset the password for ROOT or any user in Linux Mint

I am sure that people in the know can restore almost any password, it is important to know HOW. But I was wondering just how to recover passwords in my favorite OS is Linux Mint. In this article we will focus on the recovery of lost passwords for Linux Mint.

So, the following method is good because it is done very quickly and allows you to change the password to one or more users. On my operating system as most people have only one user, therefore the password root changing along with the password of the Main user. 

That is, if I change the password to my single user l4l, then user root will automatically change the password. On other operating systems, I think the user root as separately. In any case I am not interested in, the main thing here everything is convenient and WORKS))))

Don't forget: the following ways will not work if you have an encrypted home partition.
First way

Let's start, we need to get into the boot menu of GRUB. When the computer boots, hold down the "SHIFT" key. In the grub boot loader to select the desired OS and press "E" to edit the boot.

Reset the password for ROOT or any user in Linux Mint

Next we need at the end of the kernel line, after quiet splash add rw init=/bin/bash and press "F10" to boot.

Reset the password for ROOT or any user in Linux Mint

In this case, after the kernel is loaded, the control immediately proceeds to bash that allows you to change the passwords for all users. A working example can be seen in the picture below. Just write the command:

passwd Username

where Username is the login name of the user. Then simply enter the new password.

Reset the password for ROOT or any user in Linux Mint

Restart the computer and can use the new password.

Second way
Recently read about another method of password recovery. Starts the same way, we need to enter GRUB
Reset the password for ROOT or any user in Linux Mint
Once selected, you will see a window with many options, but for password recovery, you only need one - root
Reset the password for ROOT or any user in Linux Mint
If you do not know your user name(perhaps you want to hack someone else's computer), then enter the command
ls /home
By default in the restore mode, the file system is read-only and you can't just overwrite the user's password, but knowing a needed command you can fix it.
Enter the following command, which will open write access
mount -o rw,remount /
Next you need to enter the command to change the password
passwd yourusername
The word “yourusername”, I mean the user name in your system (On my screenshot - shekin)
Reset the password for ROOT or any user in Linux Mint
Now reboot
reboot
Voila, now I can't log in under my old password
Reset the password for ROOT or any user in Linux Mint
But when I entered the new password, the system booted successfully
Reset the password for ROOT or any user in Linux Mint

Even high-security Linux distributions, using the default settings, can allow an attacker with physical access to the server, it is easy to reset passwords of all users including root. For protection it is recommended to use encrypted partitions, disable the grub boot loader. Unfortunately I can't tell you how to protect your PC more effectively. It is necessary to examine this issue separately.

May the Force be with you,
Good Luck!!!

Print version

Edited by: Shekin - 10-11-2017, 05:48
Reason: New information added

What method helped you?
First one - 0 (0%)
0%
Second one - 1 (50%)
50%
Neither one - 1 (50%)
50%
Total votes: 2

Add comments

  • Local comments
  • Facebook comments
None
None 21 January 2015 22:20
Hello!
Tested it out, and it works, but:
This method is only able to change root password if, and only if root password is the same as admin password.
That is, you can change the admin password, but not the root password. The root password should of course have its own password.

Regards
  • 0
Shekin 30 January 2015 02:17
Quote: None
Hello!
Tested it out, and it works, but:
This method is only able to change root password if, and only if root password is the same as admin password.
That is, you can change the admin password, but not the root password. The root password should of course have its own password.

Regards

I agree with you. but considering only linux mint I have omitted this detail. Because when installing a system Admin instead of Root. And Root the user is not activated. In my opinion something like this))))
--------------------
x64 Linux Mint 18.2 cinnamon
  • 0
mike
mike 5 September 2015 19:12
doesnt work, it goes to the lock screen
  • +1
daniel
daniel 16 November 2015 21:05
Didn't work for me
  • +1
jkjr
jkjr 29 February 2016 21:06
I have mint 17.1 cinnamon and cannot reset my password. I've tried these commands in various ways and it does not work. I get this error message " bash: cannot set terminal process group (-1): inappropriate ioctl for device
bash: no job control in this shell
dircolors: no shell environment variable, and no shell Type option given"
(none) /#

is there any help out there? It would be greatly appreciated.
  • +2
dan
dan 28 March 2016 19:55
for me work exactly like in this tutorial

note: i try 3 times until work...2 times lock (freez) after i hit F10, i dont have any explanation way GRUB block, i do exact the same stapes 2 times....gl
  • +2
PJC
PJC 21 April 2016 03:25
I have the same OS and ran into the same problem after installing, the OS changed my PW. I tried a lot of the suggestions from the internet and nothing worked. Finally I decided to install the OS again and this time I just used one letter for a PW and it worked good. If you have the OS disc, try this or if you don't have the disc, download the OS and get it on a disc. Good Luck!!!
  • 0
Will
Will 21 January 2017 07:52
Didnt see when this post was originally made....but still works in Mint 'Sarah' in 2017
  • 0
Shekin 21 January 2017 09:49
Will,
16-11-2014, 19:21
--------------------
x64 Linux Mint 18.2 cinnamon
  • 0
Thanks
Thanks 14 March 2017 15:15
Merci ça ma sauvé la vie !!

Thanks that save my life ! (Sorry for double post)

Don't forgette to change "ro" in "rw" if linux load in read-only
  • 0
Yoshi
Yoshi 10 June 2017 08:01
I can not type passwd [4] after #.
Please help how to type in.

bash: cannot set terminal process group (-1): inappropriate ioctl for device
bash: no job control in this shell
dircolors: no shell environment variable, and no shell Type option given"
(none) /#
  • 0
abdul rehman
abdul rehman 26 August 2017 13:17
I had the same problem but i resolved it. you have to type "sudo passwd root" without quotes in terminal . it will ask for admin password and then it will ask to enter new unix password and retype/confirm and you are set with root password
  • 0
Nova
Nova 26 October 2017 03:58
I am using Mint 18.2 and this worked perfectly for me. Thank you.
  • 0
lucas cs
lucas cs 11 November 2017 12:18
Just use luks
  • 0
Edwin
Edwin 23 November 2017 07:44
Upgraded Mint 14->17 incrementally by editing sources.list and apt-get. Each step worked fine until last upgrade to 17.1. Machine boots fine and login screen appears but neither user can login. Have tried both methods 1 & 2 that appeared to work but still no login. Waiting to get Mint 18 DVD made to do live boot, mount and edit /etc/shadow but do not understand why the grub recovery mode fails. Suggestions?
  • 0
  • bowtiesmilelaughingblushsmileyrelaxedsmirk
    heart_eyeskissing_heartkissing_closed_eyesflushedrelievedsatisfiedgrin
    winkstuck_out_tongue_winking_eyestuck_out_tongue_closed_eyesgrinningkissingstuck_out_tonguesleeping
    worriedfrowninganguishedopen_mouthgrimacingconfusedhushed
    expressionlessunamusedsweat_smilesweatdisappointed_relievedwearypensive
    disappointedconfoundedfearfulcold_sweatperseverecrysob
    joyastonishedscreamtired_faceangryragetriumph
    sleepyyummasksunglassesdizzy_faceimpsmiling_imp
    neutral_faceno_mouthinnocent