[Solved] Linux Mint no longer recognizes the password

martin555

New Member
Joined
Feb 10, 2022
Messages
5
Reaction score
2
Credits
74
Hi All,

I'm on Linux Mint. I wanted to access my PC as usual, but when I enter the password, the system does not take it into account. I can't access the desktop!

It goes back and re-displays the same access page to enter the password again!

The password I enter is correct, I did not forget it. Because, when I enter a wrong password, the error message appears "Invalid Password, Please Try again".

It's like the system is stuck. Although it recognizes the password, but it does not enter.

I am absolutely blocked, and I cannot access the desktop.

Also, When I click <ctrl><alt><F1> the terminal doesn't appear! All I get is a screen that freezes and the mouse pointer disappears.

I removed the hard drive and had it explored in a Linux Live DVD. None of my files are found! The "Home/user" file is completely empty!

How can I get access again?

Or else, how to remove the password completely?

Your help is highly appreciated. I want to recover my work files that are on the disk.

Thank you,
 


kc1di

Well-Known Member
Joined
May 14, 2021
Messages
1,444
Reaction score
1,254
Credits
10,367
There are a few reasons that this can happen. It's usually not your password. But a problem with the desktop manager.
lightdm. Was the system upgraded recently? if it was and you have a timeshift snapshot you can roll back the upgrade and that may fix the problem.

Another problem that can occur is if you root partition become too full or low on space it will do the same type of thing.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
8,154
Reaction score
6,993
Credits
66,214
If it is a login loop, as @kc1di is getting at above, here's the quick/easy fix:

 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
2,055
Reaction score
1,456
Credits
15,230
Another option is the keyboard is not set correctly or your HD is full. In case it is not a login loop -
Boot from your install USB/DVD, open gparted, select your hdd/ssd, and see if there's unallocated space to the right of your / partition. If there is, expand the partition to the right. If that's not possible, close gparted, open the file manager, and navigate to your HDD/SSD. If you have a lot in your Downloads folder, delete a bunch or cut and paste them to another USB then reboot the machine. If you can then login you will need to clean up some stuff out of your drive
 
OP
M

martin555

New Member
Joined
Feb 10, 2022
Messages
5
Reaction score
2
Credits
74
Thank you All for your replies,

I have been trying for the last few days to find a solution to regain access to my PC, but so far I can't access it.

I launched the SSD on Live DVD (as an external drive under Windows, because Live DVD does not boot while the Linux SSD was inserted as an internal drive!), I gathered this information (see screenshots):

1/ The disk is full: So, what files can I delete to free up space?
It shows that it is full when in reality it is only a little over 50% full. Maybe a virus has written files on the hard disk and filled it up! Is this possible under Linux? I had not installed an antivirus, because I had read that it was not necessary under Linux.

2/ I don't see my files and folders in the "Home/user" directory! Is Home empty, and how could these files disappear?
Are the "Home" directory and its contents preserved?

3/ The ".ICEauthority" and ".Xauthority" files are not found!

4/ Is the size of "Swapfile" normal?

5/ When I first installed the program, I remember setting up the "Timeshift" backup using the "ext" partition on an external hard drive.
How can I restore the system when I'm locked out?

6/ I still can't enter the password after typing "Ctrl+Alt+F2". I get a message saying "Login is incorrect"! While the login infos are correct!

7/ I provide here the content of the "fstab" file.

8/ The system wasn't upgraded recently. The updates concern only the kernel, as usual.

How can I solve this problem and connect to the desktop again?

Thank you all,


Please, found the screenshots here:
https://www.screencast.com/t/1EORPStRZph


My Distro:
Linux Mint 20 Ulyana / Desktop: Cinnamon 4.6.7 / Kernel: 5.4.0-54-generic x86_64 / bits: 64 / CPU: Intel Core i3-4010U 1.7Ghz / RAM: 8Go
 
Last edited:

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
2,055
Reaction score
1,456
Credits
15,230
When the graphical login screen appears, do not enter your password, yet. Instead go to the first console monitor by pressing the keyboard shortcut Ctrl-Alt-F1 Here you will be prompted to log in by typing your username. Next you have to enter your password.
You will be greeted by the command prompt.
Check whether a filled filesystem is your problem by executing the command-line:
Code:
df -h | egrep "^/dev/|Filesystem"

In case a filled filesystem is not your problem, try to solve the second potential cause by deleting the 2 files,
Removing these files will never do any harm, because they will be recreated automatically, when logging in to the graphical login screen later on.
Please, execute the command-line
Code:
rm .ICEauthority .Xauthority
Note that both filenames start with a dot.

Also if you use Timeshift for making snapshots of your system. Timeshift is notorious for gobbling up free space: it eats gigabytes like they're nothing. So keep the number of its snapshots down and remove redundant snapshots within the Timeshift application itself.
 
OP
M

martin555

New Member
Joined
Feb 10, 2022
Messages
5
Reaction score
2
Credits
74
Hi @Expirion, Hi All,

Thank you for your replies,


Notice that I haven't access to the console to typing commands.

When I click "Ctrl+Alt+F2", I have the right keyboard and the right keys for both letters and numbers. I test well by entering the password in the login field, the password is displayed correctly.

I am asked to enter my login and password. I enter the login and the password. But it does not take the password (although it is But it doesn't take the password (even though it's correct), it goes back to the original situation asking me to enter the credentials again. So I don't have the console displayed.

It's the same thing as on the graphical login interface. I enter the password, and it returns to the original situation asking for the password again.

Now the problem is that the system does not take the password and also does not give me access to the Terminal!

The other problem is that when I remove the SSD and explore it as an external drive. I can't find my files in "Home/User" to at least copy or recover them.

I have read and heard that when the "Home" folder is encrypted, the files in it are not visible.

The files that are visible in "Home/User" are the two files "Access-Your-Private-Data.Desktop" and "README.txt"! And indeed they are files which indicate the encryption of the data.

Also, when I explore the size of the "Home" file, there is a note that says "Some content unreadable”.

----

Afterward, I tried to log in using “Boot Linux Grub into Single User Mode” feature.

I started my computer and pressed any key to stop the timer before the expiration time; but the GRUB menu does not appear.

I found some Grub folders and files in the system. (see screenshots)

Should I activate something or “uncomment” a line of code? Have I done something wrong?

Is the Linux Grub single user boot feature already present? Or do I have to install it?



Please, found the screenshots here :
https://www.screencast.com/t/azAbjcMB


Thank you,


My Distro:
Linux Mint 20 Ulyana / Desktop: Cinnamon 4.6.7 / Kernel: 5.4.0-54-generic x86_64 / bits: 64 / CPU: Intel Core i3-4010U 1.7Ghz / RAM: 8Go
 
N

NorthWest

Guest
martin555 wrote:
Afterward, I tried to log in using “Boot Linux Grub into Single User Mode” feature.
I started my computer and pressed any key to stop the timer before the expiration time; but the GRUB menu does not appear.
I found some Grub folders and files in the system. (see screenshots)
Should I activate something or “uncomment” a line of code? Have I done something wrong?
Is the Linux Grub single user boot feature already present? Or do I have to install it?

I think trying to get into single user mode to get in and fix the system is a reasonable option. But how to get in given your login failures? The grub menu does not appear when you boot up because the default configuration of grub is set to zero timeout according to the images you provided :
GRUB_TIMEOUT=0
GRUB_TIMEOUT_STYLE=hidden
I haven't ever used GRUB_TIMEOUT_STYLE config so I guess that it might be implicated in the problem also.

Since you can't get into your installation, there are a two options that occur to me at the moment. You can boot up a live disk or a rescue disk on the computer, mount the /home partition of the hard drive with your mint installation, and delete the .Xauthority files as Lord Boltar suggests in post #6. Then umount, and boot to see if that was sufficient to allow you to log in.

The second option also involves booting up a rescue disk or a live disk, finding and reconfiguring the grub.cfg file in /boot/grub. The aim is to force grub to give you a menu when you next boot so that you can get into single user mode and try and effect a repair. I don't know mint myself, but the grub.cfg file will be somewhere in /boot. The task is to open the grub.cfg file with a text editor and change all the "set timeout=0" statements to "set timeout=10". There might be two or more such statements. That should give you 10 seconds of time when grub presents it's menu on next bootup. You need to check that the statement "set timeout_style=menu" does have "menu" as it's option so that you do get that menu. If it doesn't, change it to show menu. Then I would write the file, umount the partition and try and boot anew to see if the grub menu appears. The grub.cfg file itself says to not edit it, but I know that this method I've outlined has worked on both fedora and debian boxen for me. If it does work, and you are able to catch the grub menu, then you need to hit "e" for editing the linux command line where you can append "S" or "single" or "1" or "emergency" or "init=/bin/sh rw" to it and boot into single mode. You should be able to adjust passwords running the passwd command. If by chance your installation runs apparmor or selinux, I would disable them by adding apparmor=0 and/or selinux =0 on the kernel command line where you've configured for single. When you can get back into your system normally you should update your grub in /etc/default/grub and run the relevant updating program.
 
Last edited by a moderator:

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
3,506
Reaction score
2,336
Credits
26,101
You Haven't told us anything about your machine, so some guesswork, is fast boot enabled in the bios? If is, then disable it.
If you can get grub to open pre-boot then you can change/reset your passwords/usernames there
 
OP
M

martin555

New Member
Joined
Feb 10, 2022
Messages
5
Reaction score
2
Credits
74
It's solved.

For all users who encounter this kind of problem, the solution is to set the percentage reserved for the root of the file system to "0" with this command:

sudo tune2fs -m0 /dev/sda2

(replace "sda2" with your partition name)

Thanks All,
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,617
Reaction score
4,696
Credits
34,228
Glad you got it sorted.

I dont completely understand just exactly how that command solved the problem, but I am happy that it did !

you asked a question re Timeshift....
When I first installed the program, I remember setting up the "Timeshift" backup using the "ext" partition on an external hard drive.
How can I restore the system when I'm locked out?
This can be achieved ny running a 'live' instance of your OS (usb stick or dvd)....and firing up Timeshift on that. Go to settings and select where the snapshot is stored (on the external) and the hit restore. You will select where to restore to etc.
Works like a charm
Once it has finished......reboot......take the usb/dvd out and your 'normal' os will spring back to life.

Just to flesh out the backing up thing a bit.....you can also create a clone of your OS.....with the same 'live' instance running, go to menu, type in Disks.....click on the htree vertical dots at top...select Creat disk image.....follow the prompts. You can save it to the same external if it has sufficient space.
The cloned image is restored by following the same path...instead choosing Restore Disk Image, etc
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,352
Reaction score
3,959
Credits
39,035
It's solved.

For all users who encounter this kind of problem, the solution is to set the percentage reserved for the root of the file system to "0" with this command:

sudo tune2fs -m0 /dev/sda2
It doesn't sound like smart idea to change this, since the default is set for a reason.
-m reserved-blocks-percentage
Set the percentage of the filesystem which may only be allocated by privileged processes. Reserving some number of filesystem blocks for use by privileged processes is done to avoid filesystem fragmentation, and to allow system dae‐
mons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. Normally, the default percentage of reserved blocks is 5%.
Just from reading that it sounds like setting that to 0 zero for your filesystem could cause problems.
 

Condobloke

Well-Known Member
Joined
Apr 30, 2017
Messages
5,617
Reaction score
4,696
Credits
34,228
^^^....which is why I fleshed out the approach for using Timeshift from a live usb and also how to take a cloned image of the OS.

Something is not quite right with that set up.

Have you considered starting fresh?....Fresh Install.??
 
OP
M

martin555

New Member
Joined
Feb 10, 2022
Messages
5
Reaction score
2
Credits
74
We can temporarily set the percentage reserved for the root of the file system to "0" to allow the connection.
sudo tune2fs -m0 /dev/sda2

Once the connection is successful, and the cleanup is done, we can return to the standard percentage of "5".
sudo tune2fs -m5 /dev/sda2
 
$200 Digital Ocean Credit
Get a free VM to test out Linux!


Staff online

Members online


Top