You are not logged in.

#1 2017-09-05 09:27:55

analbeard
Member
From: London
Registered: 2014-11-07
Posts: 49

Unable to sudo after upgrading to 1.8.21.p1-1

I upgraded this morning and since then I've been unable to use sudo either via urxvt or a TTY:

[shw@laptop pam.d]$ sudo su ansible
[sudo] password for shw:
[shw@laptop pam.d]$

Which results in:

Sep 05 10:15:12 laptop sudo[15303]: pam_exec(sudo:auth): /usr/bin/cryptsetup failed: exit code 1
Sep 05 10:15:12 laptop sudo[15303]:      shw : TTY=pts/1 ; PWD=/etc/pam.d ; USER=root ; COMMAND=/usr/bin/su
Sep 05 10:15:12 laptop sudo[15303]: pam_exec(sudo:session): /usr/bin/cryptsetup failed: exit code 5
Sep 05 10:15:12 laptop sudo[15303]: pam_unix(sudo:session): session opened for user root by (uid=0)
Sep 05 10:15:12 laptop sudo[15303]: pam_exec(sudo:session): /usr/bin/cryptsetup failed: exit code 5
Sep 05 10:15:12 laptop sudo[15303]: pam_unix(sudo:session): session closed for user root

Prior to this morning it worked fine. Any suggestions?

(the cryptsetup errors are fine, they're unrelated).

Edit:

sudoing straight to a user:

[shw@laptop pam.d]$ sudo -u ansible -s /bin/bash
[sudo] password for shw:
[shw@laptop pam.d]$
Sep 05 10:37:49 laptop sudo[31198]:      shw : TTY=pts/2 ; PWD=/home/shw ; USER=ansible ; COMMAND=/bin/bash -c /bin/bash
Sep 05 10:37:49 laptop sudo[31198]: pam_exec(sudo:session): /usr/bin/cryptsetup failed: exit code 5
Sep 05 10:37:49 laptop sudo[31198]: pam_unix(sudo:session): session opened for user ansible by (uid=0)
Sep 05 10:37:49 laptop sudo[31198]: pam_exec(sudo:session): /usr/bin/cryptsetup failed: exit code 5
Sep 05 10:37:49 laptop sudo[31198]: pam_unix(sudo:session): session closed for user ansible

Edit:

For reference, this is the pam config file which causes the errors above (from https://wiki.archlinux.org/index.php/Dm … _at_login). All cryptsetup calls are optional:

#%PAM-1.0

auth      required  pam_unix.so     try_first_pass nullok
auth      optional  pam_exec.so     expose_authtok quiet /usr/bin/cryptsetup open /dev/disk/by-uuid/a22fe640-5738-4612-aa39-ef9bdde7604d home-shw
auth      optional  pam_permit.so
auth      required  pam_env.so

account   required  pam_unix.so
account   optional  pam_permit.so
account   required  pam_time.so

password  required  pam_unix.so     try_first_pass nullok sha512 shadow
password  optional  pam_permit.so

session   optional  pam_exec.so     quiet /usr/bin/cryptsetup open /dev/disk/by-uuid/a22fe640-5738-4612-aa39-ef9bdde7604d home-shw
session   required  pam_limits.so
session   required  pam_unix.so
session   optional  pam_permit.so

Last edited by analbeard (2017-09-05 09:39:51)

Offline

#2 2017-09-06 11:10:36

sourcesmith
Member
Registered: 2017-09-06
Posts: 4

Re: Unable to sudo after upgrading to 1.8.21.p1-1

Yes, this has been happening on my system since sudo-1.8.21.p1-1.  The first sudo does not run the given command but does authorize you,  Repeating the sudo then runs the command without further prompting for the password.  Downgrading to sudo-1.8.20.p2-1 eliminates the problem.  Similarly, I have a pam_exec invocation to call a script to mount an encrypted directory in my pam system-auth file.

Offline

#3 2017-09-06 11:23:26

analbeard
Member
From: London
Registered: 2014-11-07
Posts: 49

Re: Unable to sudo after upgrading to 1.8.21.p1-1

sourcesmith wrote:

Yes, this has been happening on my system since sudo-1.8.21.p1-1.  The first sudo does not run the given command but does authorize you,  Repeating the sudo then runs the command without further prompting for the password.  Downgrading to sudo-1.8.20.p2-1 eliminates the problem.  Similarly, I have a pam_exec invocation to call a script to mount an encrypted directory in my pam system-auth file.

I'm glad it's not just me! I noticed that sudo received a minor bump today to -2 - I don't have to the time to test it yet though.

Offline

#4 2017-09-06 11:33:24

sourcesmith
Member
Registered: 2017-09-06
Posts: 4

Re: Unable to sudo after upgrading to 1.8.21.p1-1

I noticed that sudo received a minor bump today to -2 - I don't have to the time to test it yet though.

It does not resolve the problem.

Offline

#5 2017-09-06 22:06:50

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Unable to sudo after upgrading to 1.8.21.p1-1

sudo package commit log wrote:

upgpkg: sudo 1.8.21.p1-3
   
Fix usage of signal pipe which caused sudo to hang occasionally.
   
upgpkg: sudo 1.8.21.p1-2
   
Fix a logic error which prevented sudo from using the PAM-supplied prompt (FS#55514).

So I don't expect it would have been fixed. wink Have you looked at the upstream bugtracker and considered possibly filing a bug?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2017-09-07 08:39:24

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: Unable to sudo after upgrading to 1.8.21.p1-1

Currently it is at -3 and seems to work for me (I didn't get the previous two updates as I only just updated).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2017-09-07 09:25:31

sourcesmith
Member
Registered: 2017-09-06
Posts: 4

Re: Unable to sudo after upgrading to 1.8.21.p1-1

sudo-1.8.21.p1-3 still has the problem.

Offline

#8 2017-09-07 13:43:45

sourcesmith
Member
Registered: 2017-09-06
Posts: 4

Re: Unable to sudo after upgrading to 1.8.21.p1-1

Should be fixed in 1.8.21.p2-1.

Offline

#9 2017-09-08 02:14:36

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Unable to sudo after upgrading to 1.8.21.p1-1

ngoonee wrote:

Currently it is at -3 and seems to work for me (I didn't get the previous two updates as I only just updated).

But then again, all the last five versions of sudo worked for me too... so that doesn't prove much. tongue


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#10 2017-09-08 03:41:36

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: Unable to sudo after upgrading to 1.8.21.p1-1

Eschwartz wrote:
ngoonee wrote:

Currently it is at -3 and seems to work for me (I didn't get the previous two updates as I only just updated).

But then again, all the last five versions of sudo worked for me too... so that doesn't prove much. tongue

Oh, haha that wasn't clear. I thought the quick iteration of updates meant it just wasn't working for everyone and I happened to luck out and have it working on the one I updated to.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#11 2017-09-08 16:43:57

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Unable to sudo after upgrading to 1.8.21.p1-1

I can confirm that this is fixed in 1.8.21.p2-1. Running pacman as an example works just fine. smile

Fri Sep 08 jbs@dmb-gaming-laptop -> pacman -Qi sudo | grep Version
Version         : 1.8.21.p2-1
Fri Sep 08 jbs@dmb-gaming-laptop -> sudo pacman -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
Fri Sep 08 jbs@dmb-gaming-laptop -> 

I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

Board footer

Powered by FluxBB