Wrong password for pacman

Hi there. I have this new issue where when I try to update via this:
sudo pacman -Syyu
I get this error:
sudo: 1 incorrect password attempt
However when I try this su command, I get the access.
I don’t understand why this is happening. I haven’t changed my password. Anybody please help!

And Journalctl gives this:

Summary

pam_unix(sudo:auth): conversation failed
Sep 08 21:09:13 dsys sudo[3435]: pam_unix(sudo:auth): auth could not identify password for [dstyle]
Sep 08 21:09:14 dsys sudo[3435]: dstyle : 1 incorrect password attempt ; TTY=pts/2 ; PWD=/home/dstyle ; USER=root ; COMMAND=/usr/bin/pacman -Sy>
Sep 08 21:10:37 dsys sudo[3463]: pam_unix(sudo:auth): conversation failed
Sep 08 21:10:37 dsys sudo[3463]: pam_unix(sudo:auth): auth could not identify password for [dstyle]
Sep 08 21:10:39 dsys sudo[3463]: dstyle : 1 incorrect password attempt ; TTY=pts/2 ; PWD=/home/dstyle ; USER=root ; COMMAND=/usr/bin/pacman -Sy>
Sep 08 21:11:32 dsys sudo[3628]: pam_unix(sudo:auth): conversation failed
Sep 08 21:11:32 dsys sudo[3628]: pam_unix(sudo:auth): auth could not identify password for [dstyle]
Sep 08 21:11:33 dsys sudo[3628]: dstyle : 2 incorrect password attempts ; TTY=pts/2 ; PWD=/home/dstyle ; USER=root ; COMMAND=/usr/bin/pacman -S>
Sep 08 21:13:23 dsys sudo[3640]: pam_unix(sudo:auth): conversation failed
Sep 08 21:13:23 dsys sudo[3640]: pam_unix(sudo:auth): auth could not identify password for [dstyle]
Sep 08 21:13:25 dsys sudo[3640]: dstyle : 2 incorrect password attempts ; TTY=pts/2 ; PWD=/home/dstyle ; USER=root ; COMMAND=/usr/bin/pacman -S>
Sep 08 21:16:00 dsys sudo[3818]: pam_unix(sudo:auth): conversation failed
Sep 08 21:16:00 dsys sudo[3818]: pam_unix(sudo:auth): auth could not identify password for [dstyle]
Sep 08 21:16:02 dsys sudo[3818]: dstyle : 1 incorrect password attempt ; TTY=pts/2 ; PWD=/home/dstyle ; USER=root ; COMMAND=/usr/bin/pacman -Sy>

1 Like

sudo is asking for your user password.
su needs root password.

3 Likes

You have to check the files under /etc/pam.d/ and merge any files whose names end in .pacnew into the original files.

Also, please note that there is a distinct difference between su and sudo. They work differently, and in the default configuration, sudo asks for the user’s own password, not the root password, while su ─ which stands for “substitute user” ─ defaults to the root account if no other parameters are given, and thus requires the root password to be entered.

Also note that it’s better to use…

su -

… with a dash, because if you don’t, then you stand a chance of changing the ownership of certain files in your home directory to the root user, and that could lead to all kinds of mayhem.

5 Likes

Nope I set them both to be the same!. Updated op with journalctl errors!

If they are, then it’s because you made it that way. I have too, on my system, because I’ve configured sudo to require the target user’s password.

But that is not the Manjaro default out-of-the-box. The default setting is that it asks for your own password.

1 Like

Woah never new su could be that dangerous! And I didn’t find any files with .pacnew!

When using su without the dash, you are becoming the root user operating within the same environment as your normal user. You’ll even stay within the same working directory.

With the dash, su calls in a new login session and you inherit the target user’s environment ─ in this case, the root user’s environment.

More details here… :arrow_down:

man su
1 Like

Well the issue got resolved for now! I simply rebooted. But I can confirm this issue recurrs… I have had this from this afternoon… and it simply didn’t let me check for updates!!

Maybe there’s something messed up in your /etc/sudoers, or possibly in one of the files under /etc/sudoers.d/.

Note that this file, too, has a man page. :arrow_down:

man sudoers
1 Like

Will update here if I get the error again! For now its good and fine! May something could be messed up in /etc/sudoers.d/ but strangely I couldn’t access the directory!
I got this cd not found ! lol!

[dstyle@dsys ~]$ sudo cd /etc/sudoers.d/
[sudo] password for dstyle: 
sudo: cd: command not found

Dolphin couldn’t see it either!

Ps: A feedback, the forum’s format code ain’t working on chrome!

That error doesn’t have anything to do with the directory not being there ─ it should be there because it’s created by the package, but it may be empty ─ but rather, it is an error that it cannot find the command cd, which is a shell builtin.

It should normally work, unless you’ve got some plugins that block Javascript. In my Chromium here, it works perfectly.

1 Like

Oh yea forum all good. WOrkin in incognito!!

I had the same error today … After Reboot Everything works fine … Has someone found the solution to this …

1 Like

Yesterday I also had the issue.

Sudo would not accept my password, even weirder when I logged my user out, lightDM said “8 minutes left to log in” below the password field and wouldn’t accept my password until I did a full reboot.

1 Like

It is very strange that I have found like 7 posts about this password stops woriking X minutes after boot and noone seems to know how to fix it. I am living with this issue since August and now I ran out of ideas and paitence. I did a reinstall but preseverd my home folder and the issue didn’t go away.
Is Manjaro totally broken now? Should we who have the problem just use some other distro?

1 Like

I’ve thankfully not encountered this problem now since the initial event. I’m none the wiser as to what the culprit is. If you’ve re-installed your base system perhaps it’s a user issue - you could try removing the dotfiles from your home directory after backing up.

I’m afraid I don’t have anything meaningful to add.

I know this is not what this thread is about, but I nonetheless want to thank you for this explanation. I am glad I found this. Albeit only eventually.

1 Like

Finding this strange but I am also facing the same exact problem. As @AdamSzabo already tried reinstalling the OS, even if this is not helping, I am seeing a serious trouble here. We certainly need help in this thread.

1 Like

I rebooted many times, but the same issue came always (password is wrong)