Problem with my password

I can log in to my computer without problem, but then my computer says that my password is not correct, neither in the terminal nor in pamac.

does your password contains numbers? maybe the num lock gets disabled after login

1 Like

That’s not the problem, because I already tried that. Thanks.

Verify your keyboard is not partially broken.
It happens, sometimes only for one or a few keys.
If you go to TTY (CTRL+ALT+F3)
you can type and see whether the keys you need are actually producing the output that you want.

But this seems a bit unclear - what do you mean?
Can you can you not login?

That’s not the problem either. The keyboard is new and I have tried with the one I used before and the same thing happens. Yes, I can login, but then I go to a terminal and when it asks for my password, it tells me that it is not correct, but if I run the su command, I put the root password and it works.

I’d then do this:
su -
(login as root)

passwd mlpbcn
(set a new password)

CTRL+d to log out of the root account afterwards

… or you can try investigating what might be the cause …

I just noticed:
when in terminal - you are already logged in as … you
No application will ask your password again.
When a password is wanted, it is usually the root password
… but that works, as you say

this is confusing

I had a similar situation, some time ago. Ended up losing my patience and reinstalling. But I’ve since read somewhere it can be caused by unmerged .pacnew files. Have you done any updates and nor merged thee .pacnew files?

You can check by installing meld:

pamac install meld

Followed by running:

sudo DIFFPROG=meld pacdiff

Also see:


When doing that, be especially careful whenever /etc/passwd or /etc/shadow is involved.
I have seen people here replacing /etc/passwd or it’s contents … - not a good idea … :wink:

this was of course more directed at @mlpbcn rather than to you …

1 Like

meld , it only gives a small change in locale.gen, which I have updated, but everything remains the same. I’ve changed the password from su and from system preferences, but sed didn’t solve the problem either. As for a problem updating the system, I haven’t had any.
Thank you all. Can you think of anything else?

Can you give an example of a program asking for your password and it not working?
When you can do updates and merge .pacnew files, the root account is obviously o.k.
And I do not know of any terminal program that asks for your user password when you are already logged in as that user.

… and if you can update and merge .pacnew … then you can also set a new user password …

I can’t update either from terminal or from Pamac and I can update the Pacnew files because I first execute your.

Its all a little inconsistent with this:

sudo doesn’t work
and you do not get prompted for a password when you use the pamac GUI?
or do you get prompted, but the password doesn’t work?

But - for example:

su -
pacman -Syu

would work?

Have you tried to create a new password for your user account?

… just trying to assess the situation …

Take a look at the journal, using journalctl -b 0. There are messages to the log every time sudo is used. Perhaps it’ll say why it failed.

NOTE: journalctl uses a pager, less, unless told otherwise. The basics:

/pattern  search forward
?pattern  search backward
n         next forward
N         next backward     
g         go to the top
G         go to the bottom
q         quit
up and down arrow keys work to go forward and backward

Are you in the wheel group, type groups.

sudoers was updated recently and earlier this year there was a sudoers.pacnew (grep -i sudo /var/log/pacman.log).`

If you accidentally replaced that with the one that was there before
or merged it incorrectly
you’d have lost sudo access for your username in that instant …

add that to the list of files you’d need to be extra careful about when .pacnew files are merged

1 Like

I already exposed that before. if I run sudo pacman -Syu. It tells me that the password is not correct, the same password that I have put in the login and the same password that I use the pamac GUI and it also tells me that it is not correct. If I run su and then pacman -Syu, it works, ie root password works.
I have created a new password, both from su and from the system preferences GUI and everything is still the same.
Thank you.

What I struggled with is the distinction between you, obviously being able to login
but stating at the same time that the exact same password does not work


… it seems to be a sudo issue, but where does it come from?
Are you a member of the “wheel” group?
to test it, type:


If “wheel” isn’t included in the list of groups that appears
add your user account to it:

su -
gpasswd -a mlpbcn wheel

While you are at it, also test what is in the sudoers configuration file:

su -
grep -v ^# /etc/sudoers
grep -v ^# /etc/sudoers.d/10-installer

This lists all the lines in those files that are not commented out - it shows which settings are active.
One of the above commands should yield this output:
%wheel ALL=(ALL) ALL

Lets have a look into sudoers :wink: (as root)

cat /etc/sudoers|egrep -v '^$|^#'   


cat /etc/sudoers.d/*|egrep -v '^$|^#'

There are a number of entries in the forum about sudo suddenly not working, for a number of reasons.

I didn’t see it mentioned, and I don’t want to assume, but have you rebooted.

And again, the journal contains all logging.

  1. In one terminal, type journalctl -f to follow the journal realtime (ctrl-c to get out)

  2. And in another, type your sudo command

What are the messages?

Note: If the password is typed incorrect 3 times, you’ll need to wait 15 minutes. Type faillock --user <your_id> to see and to reset type faillock --user <your_id> --reset to reset.

I have done the three things you have told me, but the problem is not solved.
Thank you.

grep -v ^# /etc/sudoers 

grep -v ^# /etc/sudoers.d/10-installer
%wheel ALL=(ALL) ALL