You are not logged in.

#1 2018-04-28 08:08:11

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

sudo not working

Since my last update (yesterday) the "sudo" command is not working. Whenever I try to run any sudo command, I get the following error message:

    sudo: pam_open_session: Error in service module
    sudo: policy plugin failed session initialization

Offline

#2 2018-04-28 08:53:55

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,519
Website

Re: sudo not working

Did you check the front page announcement before you updated? It sounds like you might be affected by this: https://www.archlinux.org/news/glibc-22 … ervention/


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2018-04-28 10:52:56

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

I did not check the front page announcement. Could you please suggest a way to correct the situation now?

Offline

#4 2018-04-28 11:08:38

loqs
Member
Registered: 2014-03-06
Posts: 18,174

Re: sudo not working

Boot using arch install media then chroot in then you can examine and modify the files as required.

Offline

#5 2018-04-28 11:28:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: sudo not working

loqs, why would a install medium and chroot be needed?  The OP has not suggested that there is any problem booting.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2018-04-28 11:35:07

loqs
Member
Registered: 2014-03-06
Posts: 18,174

Re: sudo not working

Good point as long as the root account is accessible.  I over complicated the solution.

Offline

#7 2018-04-28 11:35:51

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

I have root access and can get in. I do not know what to do after that.

Offline

#8 2018-04-28 11:41:33

loqs
Member
Registered: 2014-03-06
Posts: 18,174

Offline

#9 2018-04-28 11:58:00

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

Thanks for pointing me to the check. But now that I have already updated my system, is there a way to get the sudo command working again?

Offline

#10 2018-04-28 12:01:00

loqs
Member
Registered: 2014-03-06
Posts: 18,174

Re: sudo not working

Did the grep return any results?

Offline

#11 2018-04-28 12:02:59

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

Nope, no results

Offline

#12 2018-04-28 12:05:43

loqs
Member
Registered: 2014-03-06
Posts: 18,174

Re: sudo not working

Please post the pacman.log for the update that caused this issue onwards.

Offline

#13 2018-04-28 12:09:28

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

This is the update:

[2018-04-27 19:57] [PACMAN] Running 'pacman -Syu'
[2018-04-27 19:57] [PACMAN] synchronizing package lists
[2018-04-27 19:58] [PACMAN] starting full system upgrade
[2018-04-27 20:10] [ALPM] running 'ghc-unregister.hook'...
[2018-04-27 20:10] [ALPM] transaction started
[2018-04-27 20:10] [ALPM] upgraded linux-api-headers (4.14.8-1 -> 4.16.1-1)
[2018-04-27 20:10] [ALPM] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
[2018-04-27 20:10] [ALPM] upgraded glibc (2.26-11 -> 2.27-2)
[2018-04-27 20:10] [ALPM-SCRIPTLET] Generating locales...
[2018-04-27 20:10] [ALPM-SCRIPTLET]   en_GB.UTF-8... done
[2018-04-27 20:10] [ALPM-SCRIPTLET]   en_US.UTF-8... done
[2018-04-27 20:10] [ALPM-SCRIPTLET]   mr_IN.UTF-8... done
[2018-04-27 20:10] [ALPM-SCRIPTLET] Generation complete.
[2018-04-27 20:10] [ALPM] upgraded binutils (2.29.1-3 -> 2.30-3)
[2018-04-27 20:11] [ALPM] upgraded gcc-libs (7.3.1+20180312-2 -> 7.3.1+20180406-1)
[2018-04-27 20:11] [ALPM] upgraded gcc (7.3.1+20180312-2 -> 7.3.1+20180406-1)
[2018-04-27 20:11] [ALPM] upgraded gcc-fortran (7.3.1+20180312-2 -> 7.3.1+20180406-1)
[2018-04-27 20:11] [ALPM] installed libnsl (1.2.0-1)
[2018-04-27 20:11] [ALPM] upgraded xerces-c (3.2.1-1 -> 3.2.1-2)
[2018-04-27 20:11] [ALPM] upgraded gdal (2.2.4-1 -> 2.2.4-2)
[2018-04-27 20:11] [ALPM] upgraded pinentry (1.1.0-1 -> 1.1.0-2)
[2018-04-27 20:11] [ALPM] upgraded gpgme (1.10.0-2 -> 1.11.1-1)
[2018-04-27 20:11] [ALPM] upgraded haskell-http (4000.3.11-11 -> 4000.3.11-12)
[2018-04-27 20:11] [ALPM] warning: /etc/java-8-openjdk/security/java.security installed as /etc/java-8-openjdk/security/java.security.pacnew
[2018-04-27 20:11] [ALPM] upgraded jre8-openjdk-headless (8.u162-2 -> 8.u172-2)
[2018-04-27 20:11] [ALPM] upgraded pam (1.3.0-1 -> 1.3.0-2)
[2018-04-27 20:11] [ALPM] upgraded jre8-openjdk (8.u162-2 -> 8.u172-2)
[2018-04-27 20:11] [ALPM] upgraded lib32-glibc (2.26-11 -> 2.27-2)
[2018-04-27 20:11] [ALPM] upgraded lib32-gcc-libs (7.3.1+20180312-2 -> 7.3.1+20180406-1)
[2018-04-27 20:11] [ALPM] upgraded lib32-libldap (2.4.45-1 -> 2.4.46-1)
[2018-04-27 20:11] [ALPM] upgraded libbytesize (1.1-1 -> 1.2-1)
[2018-04-27 20:11] [ALPM] upgraded libepoxy (1.5.0-1 -> 1.5.1-1)
[2018-04-27 20:11] [ALPM] upgraded libetonyek (0.1.7-1 -> 0.1.8-1)
[2018-04-27 20:11] [ALPM] upgraded libuv (1.20.0-1 -> 1.20.1-1)
[2018-04-27 20:11] [ALPM] upgraded linux (4.16.3-1 -> 4.16.4-1)
[2018-04-27 20:11] [ALPM] upgraded net-snmp (5.7.3-7 -> 5.7.3-8)
[2018-04-27 20:11] [ALPM] upgraded nmap (7.70-1 -> 7.70-2)
[2018-04-27 20:11] [ALPM] warning: directory permissions differ on /etc/openvpn/client/
filesystem: 755  package: 750
[2018-04-27 20:11] [ALPM] upgraded openvpn (2.4.5-1 -> 2.4.6-1)
[2018-04-27 20:11] [ALPM] upgraded pandoc (2.1.3-20 -> 2.1.3-21)
[2018-04-27 20:11] [ALPM] upgraded pandoc-citeproc (0.13.0.1-62 -> 0.13.0.1-63)
[2018-04-27 20:11] [ALPM] upgraded pandoc-crossref (0.3.1.0-1 -> 0.3.1.0-2)
[2018-04-27 20:11] [ALPM] upgraded perl-uri (1.73-1 -> 1.74-1)
[2018-04-27 20:11] [ALPM] upgraded xkeyboard-config (2.23.1-2 -> 2.23.1-3)
[2018-04-27 20:11] [ALPM] upgraded python2 (2.7.14-2 -> 2.7.14-3)
[2018-04-27 20:11] [ALPM] upgraded phonon-qt5 (4.10.0-1 -> 4.10.1-1)
[2018-04-27 20:11] [ALPM] upgraded python (3.6.5-1 -> 3.6.5-2)
[2018-04-27 20:11] [ALPM] upgraded python-jedi (0.11.1-1 -> 0.12.0-1)
[2018-04-27 20:11] [ALPM] upgraded python2-html5-parser (0.4.4-1 -> 0.4.5-1)
[2018-04-27 20:11] [ALPM] upgraded qt5-declarative (5.10.1-3 -> 5.10.1-4)
[2018-04-27 20:11] [ALPM] upgraded r (3.4.4-2 -> 3.5.0-1)
[2018-04-27 20:11] [ALPM] upgraded srt (1.3.0-1 -> 1.3.0-2)
[2018-04-27 20:11] [ALPM] upgraded tcl (8.6.8-2 -> 8.6.8-3)
[2018-04-27 20:11] [ALPM] upgraded thin-provisioning-tools (0.7.5-1 -> 0.7.6-1)
[2018-04-27 20:11] [ALPM] transaction completed
[2018-04-27 20:11] [ALPM] running '60-linux.hook'...
[2018-04-27 20:12] [ALPM] running '90-linux.hook'...
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Starting build: 4.16.4-1-ARCH
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [resume]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [autodetect]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Image generation successful
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Starting build: 4.16.4-1-ARCH
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [base]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [udev]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [resume]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [modconf]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [block]
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: wd719x
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> WARNING: Possibly missing firmware for module: aic94xx
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [filesystems]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [keyboard]
[2018-04-27 20:12] [ALPM-SCRIPTLET]   -> Running build hook: [fsck]
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Generating module dependencies
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
[2018-04-27 20:12] [ALPM-SCRIPTLET] ==> Image generation successful
[2018-04-27 20:12] [ALPM] running 'detect-old-perl-modules.hook'...
[2018-04-27 20:12] [ALPM] running 'ghc-register.hook'...
[2018-04-27 20:12] [ALPM] running 'mktexlsr.hook'...
[2018-04-27 20:12] [ALPM] running 'systemd-daemon-reload.hook'...
[2018-04-27 20:12] [ALPM] running 'systemd-tmpfiles.hook'...
[2018-04-27 20:12] [ALPM] running 'systemd-update.hook'...
[2018-04-27 20:12] [ALPM] running 'texinfo-install.hook'...
[2018-04-27 20:12] [ALPM] running 'update-desktop-database.hook'...

Offline

#14 2018-04-28 12:10:09

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

I think pam gets updated here:
2018-04-27 20:11] [ALPM] upgraded pam (1.3.0-1 -> 1.3.0-2)

Offline

#15 2018-04-28 12:10:53

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

Should I downgrade pam?

Offline

#16 2018-04-28 16:38:49

CPlusPandaGives
Member
From: United Kingdom
Registered: 2017-03-07
Posts: 11

Re: sudo not working

I may have overlooked this but have you tried installing the 'libnss_nis' package as per post #2's link?

Offline

#17 2018-04-28 17:41:49

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

Installed 'libnss_nis', did not solve the problem. Sorry.

Offline

#18 2018-04-28 18:54:44

seth
Member
Registered: 2012-09-03
Posts: 60,298

Re: sudo not working

Let's see.

grep -r pam_unix /etc/pam.d

(There *will* be output, please post it in code tags)

Offline

#19 2018-04-28 19:01:20

loqs
Member
Registered: 2014-03-06
Posts: 18,174

Re: sudo not working

The output of

cat /etc/pam.d/sudo
cat /etc/pam.d/system-auth

Do you remember ever editing in config files in /etc/pam.d/ ?

Offline

#20 2018-04-29 04:30:23

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

Thanks, loqs. These are the text of the files you requested.

cat /etc/pam.d/sudo

#%PAM-1.0
auth        include        system-auth
account        include        system-auth
session        include        system-auth

cat /etc/pam.d/system-auth

#%PAM-1.0

auth      required  pam_unix.so     try_first_pass nullok
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   required  pam_limits.so
session   required  pam_unix.so
session   optional  pam_permit.so



I have never edited any config files in /etc/pam.d/

Offline

#21 2018-04-29 04:34:07

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

Seth, please find the output of grep -r pam_unix /etc/pam.d:

/etc/pam.d/system-services:session   required    pam_unix.so
/etc/pam.d/postgresql:auth		required	pam_unix.so
/etc/pam.d/postgresql:account		required	pam_unix.so
/etc/pam.d/postgresql:session		required	pam_unix.so
/etc/pam.d/userdel:auth		required	pam_unix.so
/etc/pam.d/userdel:account		required	pam_unix.so
/etc/pam.d/userdel:session		required	pam_unix.so
/etc/pam.d/usermod:auth		required	pam_unix.so
/etc/pam.d/usermod:account		required	pam_unix.so
/etc/pam.d/usermod:session		required	pam_unix.so
/etc/pam.d/crond:auth      required    pam_unix.so
/etc/pam.d/crond:account   required    pam_unix.so
/etc/pam.d/crond:session   required    pam_unix.so
/etc/pam.d/chpasswd:auth		required	pam_unix.so
/etc/pam.d/chpasswd:account		required	pam_unix.so
/etc/pam.d/chpasswd:session		required	pam_unix.so
/etc/pam.d/chpasswd:password 	required 	pam_unix.so sha512 shadow
/etc/pam.d/other:auth		required	pam_unix.so
/etc/pam.d/other:account		required	pam_unix.so
/etc/pam.d/other:password	required	pam_unix.so
/etc/pam.d/other:session		required	pam_unix.so
/etc/pam.d/chfn:auth		required	pam_unix.so
/etc/pam.d/chfn:account		required	pam_unix.so
/etc/pam.d/chfn:session		required	pam_unix.so
/etc/pam.d/screen:auth		required	pam_unix.so
/etc/pam.d/chage:auth		required	pam_unix.so
/etc/pam.d/chage:account		required	pam_unix.so
/etc/pam.d/chage:session		required	pam_unix.so
/etc/pam.d/groupadd:auth		required	pam_unix.so
/etc/pam.d/groupadd:account		required	pam_unix.so
/etc/pam.d/groupadd:session		required	pam_unix.so
/etc/pam.d/useradd:auth		required	pam_unix.so
/etc/pam.d/useradd:account		required	pam_unix.so
/etc/pam.d/useradd:session		required	pam_unix.so
/etc/pam.d/chsh:auth		required	pam_unix.so
/etc/pam.d/chsh:account		required	pam_unix.so
/etc/pam.d/chsh:session		required	pam_unix.so
/etc/pam.d/system-auth:auth      required  pam_unix.so     try_first_pass nullok
/etc/pam.d/system-auth:account   required  pam_unix.so
/etc/pam.d/system-auth:password  required  pam_unix.so     try_first_pass nullok sha512 shadow
/etc/pam.d/system-auth:session   required  pam_unix.so
/etc/pam.d/cups:auth		required	pam_unix.so
/etc/pam.d/cups:account		required	pam_unix.so
/etc/pam.d/cups:session		required	pam_unix.so
/etc/pam.d/su-l:auth		required	pam_unix.so
/etc/pam.d/su-l:account		required	pam_unix.so
/etc/pam.d/su-l:session		required	pam_unix.so
/etc/pam.d/su:auth		required	pam_unix.so
/etc/pam.d/su:account		required	pam_unix.so
/etc/pam.d/su:session		required	pam_unix.so
/etc/pam.d/shadow:auth		required	pam_unix.so
/etc/pam.d/shadow:account		required	pam_unix.so
/etc/pam.d/shadow:session		required	pam_unix.so
/etc/pam.d/passwd:#password	required	pam_unix.so sha512 shadow use_authtok
/etc/pam.d/passwd:password	required	pam_unix.so sha512 shadow nullok
/etc/pam.d/groupdel:auth		required	pam_unix.so
/etc/pam.d/groupdel:account		required	pam_unix.so
/etc/pam.d/groupdel:session		required	pam_unix.so
/etc/pam.d/groupmod:auth		required	pam_unix.so
/etc/pam.d/groupmod:account		required	pam_unix.so
/etc/pam.d/groupmod:session		required	pam_unix.so
/etc/pam.d/newusers:auth		required	pam_unix.so
/etc/pam.d/newusers:account		required	pam_unix.so
/etc/pam.d/newusers:session		required	pam_unix.so
/etc/pam.d/newusers:password 	required 	pam_unix.so sha512 shadow

Offline

#22 2018-04-29 06:25:58

seth
Member
Registered: 2012-09-03
Posts: 60,298

Re: sudo not working

Nope.

pacman -Qm
pacman -Qkk pam

Offline

#23 2018-04-29 14:58:04

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

For pacman -Qm, I get

diction 1.11-2
dropbox 39.4.49-1
emacs-color-theme 6.6.0-8
emacs-ess 17.11-1
enchant1.6 1.6.1-5
expressvpn 1.3.1-1
ganttproject 2.8.6-1
gcc-gcj-ecj 4.9-4
goffice0.8 0.8.17-4
google-chrome 64.0.3282.167-1
js 24.2.0-4
laptop-mode-tools 1.71-1
lib32-libmng 2.0.3-1
lib32-libtxc_dxtn 1.0.1-5
libgcj17-bin 6.4.0_11-1
libsynaptics 0.14.6c-7
libtxc_dxtn 1.0.1-6
lorem-ipsum-generator 0.3-4
nodejs-tldr 3.0.1-1
pdftk-bin 2.02_4_b2-3
perl-leocharre-basename 1.08-1
python2-beautifulsoup3 3.2.1-3
skypeforlinux-bin 8.12.76.7-1
touchpad-state-git 0.89.1-1
ttf-devanagarifonts 1.0-1
ttf-gurmukhi_punjabi 0.0-0
webkitgtk2 2.4.11-6
xfce4-places-plugin 1.7.0-5

For pacman -Qkk pam, I get:

warning: pam: /etc/environment (File type mismatch)
pam: 585 total files, 1 altered file

Offline

#24 2018-04-29 15:05:53

seth
Member
Registered: 2012-09-03
Posts: 60,298

Re: sudo not working

file /etc/environment
cat /etc/environment # if this is still some sort of text

Offline

#25 2018-04-29 15:09:09

shubhoRoy
Member
Registered: 2016-08-13
Posts: 19

Re: sudo not working

file command gives:

/etc/environment: broken symbolic link to /home/chiky/system/etc/environment

cat command gives:

cat: /etc/environment: No such file or directory

Offline

Board footer

Powered by FluxBB