LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > antiX / MX Linux
User Name
Password
antiX / MX Linux This forum is for the discussion of antiX and MX Linux.

Notices


Reply
  Search this Thread
Old 03-07-2022, 07:26 AM   #1
LinWinux
Member
 
Registered: May 2019
Location: Germany
Distribution: MX Linux & Linux Mint XFCE
Posts: 299

Rep: Reputation: Disabled
Both root and generic user passwords stopped working


Hi everyone,

I ran into a real strange problem with my access passwords today. It all started after I installed MX Linux from scratch with a previously created live usb. The live usb has been used for the installation on about a dozen machines, so I'm relatively certain that the live USB is/was fine. Installation went without a hitch, as did a couple reboots afterwards.

However, the root password from the installation was a default password that I wanted to replace with one of my own. So I opened up the MX User Manager, entered the original password in order to be able to work with the user manager, and then proceeded to change the the login password to my desired choice. All of this worked without a problem whatsoever.

A couple of hours later I paid for and downloaded the file to a very reputable VPN provider. I downloaded their .deb file without a problem. Then I clicked on the .deb in order to install it. And that's where everything went sideways (but it has nothing to do with the .deb file).

I was prompted for a password in order to install the .deb file. For some odd reason the newly "successfully" changed password did not work. Three tries and I was bumped out. Then I tried it again by using the original old login password. Same thing, three tries and I was bumped out. Okay, no problem, let me get back into the MX User Manager in order to try and figure out where the password issue is, or to simply assign a new password.
Uh oh, the user manager didn't accept either of those two passwords either.
What the heck? Then tried sudo apt-get update ... same issue with both passwords.

At this point I'm totally stumped and have no idea what's going on? I'm afraid to reboot my machine, just in case the same thing happens on the login screen after rebooting. Everything on my system works and I haven't come across any errors for anything .... except this strange inexplicable password issue. Can someone please help me to get this resolved with the terminal? If at all possible I'd just like to set root privileges for myself across the board. Nobody else touches this machine, so that shouldn't be an issue.
I'm simply not able to use any passwords at the moment ... ???
Thank you.
 
Old 03-07-2022, 07:34 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
One way to break out of this kind of situation is to boot from a rescue disc, mount your usual root partition and manually edit the shadow file where the passwords are actually stored (/etc/shadow). You will need to change its permissions; by default it is not writable even by root. Once you have backspaced out the root password and reset the file permissions, you should be able to reboot and log in as root without any password at all. Then you can reset your password.
 
Old 03-07-2022, 09:02 AM   #3
suramya
Member
 
Registered: Jan 2022
Location: Earth
Distribution: Debian
Posts: 249

Rep: Reputation: 102Reputation: 102
Quote:
Then I clicked on the .deb in order to install it. And that's where everything went sideways (but it has nothing to do with the .deb file).
How do you know that? It appears that the file could have been infected with something

Quote:
One way to break out of this kind of situation is to boot from a rescue disc, mount your usual root partition and manually edit the shadow file where the passwords are actually stored (/etc/shadow).
Instead of manually editing the files, I recommend that you do the following instead:

* Boot the system from a rescue disk
* Open a command prompt, mount the root partition of the installation (all commands here are run as root)

Code:
mount /dev/sdx1 /mnt/location
Where /dev/sdx1 is your installation's root partition, and /mnt/location is the directory where you are mounting it.

* Once mounted chroot to the installation using the following command:

Code:
chroot /mnt/location
Once done, you can issue a passwd command to reset the password. Once the password is changed, type exit to exit from the chroot env and then you can reboot the system and boot into your linux install to log in with the new password
 
1 members found this post helpful.
Old 03-07-2022, 09:55 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by suramya View Post
Once done, you can issue a passwd command to reset the password. Once the password is changed, type exit to exit from the chroot env and then you can reboot the system and boot into your linux install to log in with the new password
I wonder if that would work in this case. passwd requires the existing password to be given before setting a new one. If the existing one doesn't work for some reason, you're no better off. But it's less drastic than my method and certainly worth trying first.
 
Old 03-07-2022, 09:55 AM   #5
LinWinux
Member
 
Registered: May 2019
Location: Germany
Distribution: MX Linux & Linux Mint XFCE
Posts: 299

Original Poster
Rep: Reputation: Disabled
Thank you Hazel and suramya.
I'll try and get it resolved with Hazel's suggestion. That seems to be the easier way to go or at least something that I can relate to easier.
I know that the image is good for two reasons. One, because it's an image that I created on another one of my machines with a problem that has occurred strictly on this and none of the other machines, and Two, because the issue didn't exist at all, until I decided to use the MX User Manager. Before then everything was fine and the passwords were working correctly, both old and new, depending on which application I was using (either from my old previous apps or the new app with the new password from the image.

There was another problem with the MX User Manager too, perhaps it has something to do with it?
I created myself a new user with the new password. Then I logged off, followed by logging in with the new user and then deleting the other default user from the MX User Manager. But the user didn't delete because after a reboot when I tried to use something from the old user which had been deleted by the new user with the proper credentials ... I received an error message that the function couldn't be completed because it was still being used by another user. The only other user which existed though, was the one that I had deleted. So I think this whole issue has something to do with the MX User Manager not "managing" the desired functions properly.

Last edited by LinWinux; 03-07-2022 at 09:57 AM.
 
Old 03-07-2022, 10:33 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
I took a look at the MX User Manager and it's precisely the kind of software that I detest. It takes something that used to be simple (in the sense of not being internally complicated or hard to understand) and deliberately complicates it in the interests of "user-friendliness". It's not so friendly when it goes wrong, is it!
 
1 members found this post helpful.
Old 03-07-2022, 10:50 AM   #7
LinWinux
Member
 
Registered: May 2019
Location: Germany
Distribution: MX Linux & Linux Mint XFCE
Posts: 299

Original Poster
Rep: Reputation: Disabled
You're absolutely right, hazel.
 
Old 03-07-2022, 11:12 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Out of curiosity what version of MX are you running?
 
Old 03-08-2022, 04:19 AM   #9
LinWinux
Member
 
Registered: May 2019
Location: Germany
Distribution: MX Linux & Linux Mint XFCE
Posts: 299

Original Poster
Rep: Reputation: Disabled
I'm not sure about the version of MX since I just keep doing updates, including kernel updates when they come along. Then about every 4 months I check for an upgrade i.e. sudo apt-get dist-upgrade followed by another general update. So I've been creating updated images of my setup for the past 2.5 to 3 years and never had a problem until now.

If someone could just provide me with a step by step for creating a brand new user account with a password via the terminal ... or even without a password ... then I can just redo everything with the new account and ignore the user with the password issues. I believe the password issues that I've been experiencing are limited strictly to the operation of the MX User Manager. So with a new account, I would make it a point to never use the MX User Manager again.
Problem solved?
 
Old 03-08-2022, 05:40 AM   #10
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
To create a new user, you have to be root. If you can log in as root, fine. I'd advise using ctrl+alt+F2 to get a text console to log into rather than logging in graphically. You should never log in graphically as root and some desktops won't let you anyway. If you can't log in as root at a text console, use the chroot method described by suramnya.

Once you are in as root, use the adduser command, with the new user's name as argument. I think all Debian-based distros have this command; it's a bit easier to use than the original useradd. Then use the passwd command with the user's name to set a password. That should be all you need.
 
Old 03-08-2022, 05:45 AM   #11
suramya
Member
 
Registered: Jan 2022
Location: Earth
Distribution: Debian
Posts: 249

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by hazel View Post
I wonder if that would work in this case. passwd requires the existing password to be given before setting a new one. If the existing one doesn't work for some reason, you're no better off. But it's less drastic than my method and certainly worth trying first.
Actually no, since you are logged in as root and have used chroot. It is a bit counter intuitive but all the guides to resetting passwords suggest this method.
 
Old 03-08-2022, 08:56 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
At one time especially with Ubuntu with only an administrator user i.e the user created during the install, if that user was deleted regardless if the new user had sudo privileges it could not do anything with sudo. I am wondering if MX is similar.

I just installed MX 21 and the installer "asks" if you want to create a root password. I've played with other versions but I don't remember if the installer is the same. I don't know of a default root password except for the live version.

A slightly easier (maybe) way to change the root password is to boot to recovery mode. At the grub boot menu press e, then add init=/bin/bash to the end of the line that starts with linux. Leave a space between splash and init. After it boots, your in single user mode as root, use the passwd command to change root's password. To reboot the system after the password change type in exec /sbin/init at the prompt.
 
Old 03-08-2022, 10:58 AM   #13
LinWinux
Member
 
Registered: May 2019
Location: Germany
Distribution: MX Linux & Linux Mint XFCE
Posts: 299

Original Poster
Rep: Reputation: Disabled
Thank you everyone.
I'm not as comfortable with these solutions as I thought I would be. The terminal is something that I use rarely, strictly for updates, generic occasional sh package installations, and other "boring simple" tasks. Although it may be considerably more time consuming, another installation from scratch is something that I would be more comfortable with, due to the familiarity of the process. I may have gotten away from Windoze back in 2009, but I'm definitely 99% still a "point 'n' click" junkie.

I'm going to restore my grub with the boot repair iso and then wipe out the installation/user with the password issues from the fresh install completely. Afterwards I'll install the live usb again, but this time I'll take the default user and leave that one as is. Again, thank you. All of your answers are appreciated.
 
Old 03-08-2022, 11:27 AM   #14
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
If you're not accustomed to the command line, it's a tall order to be told to suddenly start using it in an emergency. Of course you should do what you feel most comfortable with. But maybe when you are up and running again, you might want to start exploring that interface, just to learn a bit about it. One thing about Linux is that when it goes wrong, you can nearly always fix it, but not necessarily with graphical tools alone. Having access to the command line gives you a bigger toolbox.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Resetting lost Linux root passwords, a history of bad passwords, Python, Ruby, classroom solutions, and more LXer Syndicated Linux News 0 05-08-2018 12:44 AM
kernel-generic and kernel-generic-smp ?? liuyug Slackware - Installation 5 06-01-2014 07:01 PM
what are initrd.img-2.6.28-11-generic and vmlinuz-2.6.28-11-generic? karuna-bdc Linux - Newbie 11 07-17-2009 05:00 AM
how to convert user passwords and group passwords using pwconv? dolceinter1 Linux - Security 2 11-04-2008 10:03 PM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 10:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > antiX / MX Linux

All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration