Reset your MX root passwd @boot

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
alamahant
Posts: 42
Joined: Thu Dec 19, 2019 9:48 pm

Reset your MX root passwd @boot

#1 Post by alamahant »

Sometimes you might find yourself in the unfortunate situation that you forgot your root passwd or that it has somehow been changed or stopped functioning.
This means lack of access to the root account.
Fortunately there is a very easy way to change this password(with all horrifying implications that this ability has).
This is how is done.
Power on your machine and when the grub menu appears pres "e" to edit.
Find the kernel line(the line starting with "linux" and append at the end
init=/bin/bash
Pess CTRL+x to boot normally.
You will boot into single user mode.
Type
mount -o remount,rw /
######Actually if in the "linux" line towards the end you see a tag "ro" then replace "ro" with "rw".Then you do not need to remount the filesystem once in single-user mode.
Issue:
passwd
and you will prompted twice to enter the new root password.
Then TYPE
/etc/init.d/reboot stop
...to reboot your machine
Login to root with the NEW password.
Thats it.
There are other ways to also achieve this,namely CHROOT into your MX installation either from another OS(in case you multi-boot) OR from any livecd.

Now as sweet as this may sound ,it is a horrible security hole.
Anyone with (physical) access to your machine can potentially hack into it.
Solutions:
1)Use a BIOS password(DO NOT EVER DO THAT BECAUSE YOU MIGHT END UP BRICKING YOUR MACHINE).
2)Install MX on LUKS
3)Hide the GRUB menu.
And most importantly.....
...NEVER let anyone untrusted have physical access to your machine....
;) ;)
Last edited by alamahant on Sun Dec 29, 2019 5:37 am, edited 1 time in total.

User avatar
jeffreyC
Posts: 522
Joined: Mon May 27, 2019 10:39 am

Re: Reset your MX root passwd @boot

#2 Post by jeffreyC »

A lesson I learned from very old school hackers: Physical access is root access

Post Reply

Return to “Tips & Tricks by users”