Help! Password wont work

Linuxminthelp

New Member
Joined
Apr 13, 2022
Messages
28
Reaction score
9
Credits
212
hey I really need help, please

I have been using Mint for months no issue. I have my login password memorized and written down on paper. I've logged in hundreds of times...

Randomly its saying incorrect password and I can't get in to the OS. I tried cap locks. Different keyboard. Tried going into windows, keyboard works.

Is there a way in via bios?
Is there something accidentally triggering this?
 


One method of password recovery is to boot into single mode and set
Code:
passwd UserName
while root.
It's a good idea to set a root password, too, while you're at it and to add new users or modify their group standings, et cetera

There is a lockout set in BIOS or elsewhere as to number of log attempts before shutout occurs

Other handy commands root and dealing with users and passwords --

Code:
useradd -m (name)

usermod (name)
 
Last edited:
Do you know why it suddenly would change password? I got it written down right here. Same password for months
 
OK I got in as single user mode. It gave a root prompt. I did the command passwd
Then it took my new password. But after rebooting it STILL says invalid password
 
Have you changed anything to do with your user account recently?

Is there anyone else in the house/office etc that has access to the pc/laptop?

Did this follow a recent update?

Do you have Timeshift set up ?
 
Have you changed anything to do with your user account recently?

Is there anyone else in the house/office etc that has access to the pc/laptop?

Did this follow a recent update?

Do you have Timeshift set up ?
I installed a new pureOS KVM virtual machine yesterday. But I doubt a VM could stop host login like that? Plus I've logged in since then

Nobody else has access, unless I was hacked. But this is a bizarre way to do it?

No recent updates to host OS

I don't believe timeshift is setup.

I can get root access in that single mode recovery
 
@Linuxminthelp -- as single user, simply entering the command
Code:
passwd
will give a new ROOT password.

The ROOT account, once signed in with its password, will allow for creating and/or changing USER accounts, too.

Once becoming root, the commands to do these manipulations become functional.

Code:
Use with caution
Unix-like systems assume that the system administrator knows exactly what he or she is doing and that only such individual(s) will be using the root account. Thus, there is virtually no safety net for the root user in the event of a careless error, such as damaging or deleting a critical system file (which could make the entire system inoperable). For this reason, we would strongly encourage you to make backups of any files/directories you are working with. You might also want to consider our Snapshot Backup add-on detailed here: DV Backup Options.

Adding to the danger of routinely using the system as root is the fact that all processes (i.e., instances of programs in execution) started by the root user have root privileges. Because even the most widely used and well-tested application programs contain numerous programming errors (due to the huge amount of code required and its great complexity), a skilled attacker can often find and exploit such an error to obtain control of a system when a program is run with root privileges rather than using an ordinary user account, with its very limited privileges.

A critical means for preventing users from directly damaging Unix-like systems or increasing the vulnerability of such systems to damage by others is the avoidance of using the root account except when absolutely necessary, even by knowledgeable and experienced system administrators. That is, rather than routinely logging into the system as root, administrators should log in with their admin account and then use the su command. This will provide you with root privileges only as needed and without requiring a new login.

From -- https://mediatemple.net/community/products/dv/204643890/an-introduction-to-the-root-user


Useful references --
https://www.cyberciti.biz/faq/linux-login-as-super-user/
https://www0.sun.ac.za/hpc/images/d/d5/Rute.pdf

Sometimes Gnome Keyring screws up the password on upgrade, it seems. I quit using Gnome years ago.

Users are expected to do a little research on their own should they have a willingness to learn. One just needs the willingness and a command reference for Linux.

You will figure it out!
Or bork your system, in which case one gets to reinstall and the learning curve has begun!

Have fun!
 
Last edited:
@Linuxminthelp -- as single user, simply entering the command
Code:
passwd
will give a new ROOT password.

The ROOT account, once signed in with its password, will allow for creating and/or changing USER accounts, too.

Once becoming root, the commands to do these manipulations become functional.

Code:
Use with caution
Unix-like systems assume that the system administrator knows exactly what he or she is doing and that only such individual(s) will be using the root account. Thus, there is virtually no safety net for the root user in the event of a careless error, such as damaging or deleting a critical system file (which could make the entire system inoperable). For this reason, we would strongly encourage you to make backups of any files/directories you are working with. You might also want to consider our Snapshot Backup add-on detailed here: DV Backup Options.

Adding to the danger of routinely using the system as root is the fact that all processes (i.e., instances of programs in execution) started by the root user have root privileges. Because even the most widely used and well-tested application programs contain numerous programming errors (due to the huge amount of code required and its great complexity), a skilled attacker can often find and exploit such an error to obtain control of a system when a program is run with root privileges rather than using an ordinary user account, with its very limited privileges.

A critical means for preventing users from directly damaging Unix-like systems or increasing the vulnerability of such systems to damage by others is the avoidance of using the root account except when absolutely necessary, even by knowledgeable and experienced system administrators. That is, rather than routinely logging into the system as root, administrators should log in with their admin account and then use the su command. This will provide you with root privileges only as needed and without requiring a new login.

From -- https://mediatemple.net/community/products/dv/204643890/an-introduction-to-the-root-user


Useful references --
https://www.cyberciti.biz/faq/linux-login-as-super-user/
https://www0.sun.ac.za/hpc/images/d/d5/Rute.pdf

Sometimes Gnome Keyring screws up the password on upgrade, it seems. I quit using Gnome years ago.

Users are expected to do a little research on their own should they have a willingness to learn. One just needs the willingness and a command reference for Linux.

You will figure it out!
Or bork your system, in which case one gets to reinstall and the learning curve has begun!

Have fun!
Hey I did passwd user before. Now its just reprompting for password even if correct. (No longer saying "invalid password", unless it actually is wrong.)

Like someone hitting lock button repeatedly
 
Hello Linuxminthelp.
This is a long shot, but it's worked for me in the past. You could boot up a rescue disk, or a live-cd, and mount the root partition in read-write mode, navigate to /etc and open the passwd files in that directory with a text editor. Find the root line, which looks something like the following and is usually the first line in the file:
Code:
root:x:0:0:root:/root:/bin/bash
Delete the second field, that is in this example, delete the "x" and write the file. The field holds the password. Do nothing else in the file. Repeat for all the passwd files such as: passwd- and passwd.org if they exist. Then unmount the root partition, and poweroff and reboot on a powercycle. On rebooting, boot to single user mode as you mentioned in your post #4 above. You should be able to login to root without a password, just hit enter and if you are lucky you'll get a shell prompt that you can use. Then you can create a new password if you wish. This procedure can be used for a user as well. If it works for root though, root can create a user's new password.

Another idea occurred to me in relation to "protective software" misbehaving. You might consider disabling apparmor or selinux if either of those are running on your machine. You can do that by adding: apparmor=0, or selinux=0, to the kernel boot line which you can access through the grub menu after you hit "e" when the grub menu appears, navigate down to the linux line, add the relevant disabling option after a space and inside the quote marks and hit cntl+x to boot. You could try this procedure first and it if wasn't successful, I would consider doing this in addition to the first proposal above on your reboot. Trial and error.

I note that if this password issue was happening in single user mode at the terminal, it's not likely to be an .Xauthority issue.
 
Last edited by a moderator:
Sounds like it might currently be a login loop. A search will reveal a number of potential solutions.

It could also be some sort of corrupt profile, but look into login loop solutions.
 
Sounds like it might currently be a login loop. A search will reveal a number of potential solutions.

It could also be some sort of corrupt profile, but look into login loop solutions.

You saved the day! We are in!!!!! I am able to get into GUI OS now. This was the command to fix it...

Sudo chown user:user .xAuthority

I am thrilled to be back with my files/OS. However confused and nervous how this happened. And what can be done to prevent it
 
That's very good news. I realise that I missed something in your post #4. You wrote:
OK I got in as single user mode. It gave a root prompt. I did the command passwd
Then it took my new password. But after rebooting it STILL says invalid password
You did change your password, which worked in the terminal, but when you then tried to login in at the GUI login dialog box it failed. What I had in mind, mistakenly now it seems, is that you would log into your system from the text prompt, and then start up the GUI with a command such as startx which bypasses the GUI login that the display manager presents when you boot up, but that the problem still existed at the text prompt. So, I'm sorry I missed the finer details, but I'm glad that you've succeeded without too much trouble at all really.
 
I appreciate your insight.

However I have to re-enter recovery terminal and redo the commands each time I boot up.

Is there a way to permanently chown this .Xauthority file?

also what caused this?
 
Linuxminthelp wrote:
I have to re-enter recovery terminal and redo the commands each time I boot up.

Is there a way to permanently chown this .Xauthority file?

also what caused this?
Of course you shouldn't have to redo recovery commands each time you boot up.
I'm not quite sure of why you would need to change the ownership of the ~/.Xauthority file since it can be deleted without stopping X from running and it is usually recreated by startx or some config in the display manager that calls startx. If you are starting X as root by any chance, then it's ownership will be root and not the user. That could be an issue. The informed wisdom on X is that it is very inadvisable to start it up as root because there are security issues with it. Some distros run an Xorg.wrap command to try and manage the issue. The vulnerability basically lets another user gain root privileges if they are on the system and know what to do. I don't know how to do that, but I'm just reporting it. If you can clarify how you are logging in with great precision, that might help in seeing the issues since you shouldn't need to use a recovery terminal each time.
 
I appreciate your insight.

However I have to re-enter recovery terminal and redo the commands each time I boot up.

Is there a way to permanently chown this .Xauthority file?

also what caused this?
Did you by any chance try
Code:
sudo startx
This will explain why ./Xauthority is/was owned by root.
To avoid having to "chown" the file over and over, once logged in to your OS, launch a terminal and do:
Code:
sudo rm ~/.Xauthority
Then reboot. This will delete the file and recreate it upon re-login, and your user should be the owner.
 
Last edited:
Did you by any chance try
Code:
sudo startx
This will explain why ./Xauthority is/was owned by root.
To avoid having to "chown" the file over and over, once logged in to your OS, launch a terminal and do:
Code:
sudo rm ~/.Xauthority
Then reboot. This will delete the file and recreate it upon re-login, and your user should be the owner.
OK so I logged in, used OS terminal to remove it like you said, did "Ls -LA" and its gone. Reboot and same thing. It is recreated but have to chown it everytime
 
Linuxminthelp wrote:

Of course you shouldn't have to redo recovery commands each time you boot up.
I'm not quite sure of why you would need to change the ownership of the ~/.Xauthority file since it can be deleted without stopping X from running and it is usually recreated by startx or some config in the display manager that calls startx. If you are starting X as root by any chance, then it's ownership will be root and not the user. That could be an issue. The informed wisdom on X is that it is very inadvisable to start it up as root because there are security issues with it. Some distros run an Xorg.wrap command to try and manage the issue. The vulnerability basically lets another user gain root privileges if they are on the system and know what to do. I don't know how to do that, but I'm just reporting it. If you can clarify how you are logging in with great precision, that might help in seeing the issues since you shouldn't need to use a recovery terminal each time.
These are the steps I have to take to log in,

1) At password screen of GUI press control alt f3

2) at black screen terminal enter username then new password

3) type "ecryptfs-mount-private" then my OLD password to decrypt it

4) CD /home/user

5) Ls -la

6) sudo chown user:user .Xauthority

7) control alt f7 to get GUI OS login. Works normal now.

On a side note, There is no sound from speakers or even visible slider on the host OS or virtual boxes but the virtual machine KVM qemu sound works.
 
I suggest you reinstall the DE, to make this issue go away.
 

Members online


Latest posts

Top