Sudo crash, can't access sudo, Segmentation fault (core dumped), Fedora 40

I can’t access sudo from Terminal.
Example:
I type: sudo su, I get prompted for sudo password, I enter password and then I just get “Segmentation fault (core dumped)” and I can’t do aynthing like use dnf to install or remove apps etc.

How can I get my sudo back?

Have you tried sudo dnf ...?
Have you set a root password with sudo passwd root?
If the root password is set then accessing root is done using su
We need more information to assist.

journalctl -xe | grep abrt

Hi,

Thank you for the quick response.

I’ve tried sudo dnf, I’ve set root password during system installation, I’ve recently updated to Fedora 40.

Root password is correct, I concluded this because I’ve been asked for password just once and after that whenever I try anything with “sudo” I just get error message.

Here is also the recent log:

This is more a screenshot of some logs…

I am sure journalctl -xe | grep abrt and journalctl -xe | grep sudo will tell us more. Please paste it as Preformatted Text, not as screenshot.

Also check out File better bugs with coredumpctl - Fedora Magazine. Maybe you can generate a backtrace…

May 14 15:04:54 <user> abrt-server[43665]: Deleting problem directory ccpp-2024-05-14-15:04:53.726939-43629 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:04:54 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:04:54 <user> abrt-notification[43717]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report
May 14 15:08:33 <user> abrt-server[45853]: Deleting problem directory ccpp-2024-05-14-15:08:32.976636-45817 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:08:33 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:08:33 <user> abrt-notification[45905]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report
May 14 15:08:38 <user> abrt-server[46023]: Deleting problem directory ccpp-2024-05-14-15:08:37.927246-45986 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:08:38 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:08:38 <user> abrt-notification[46075]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report
May 14 15:08:43 <user> abrt-server[46134]: Deleting problem directory ccpp-2024-05-14-15:08:43.226816-46098 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:08:43 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:08:43 <user> abrt-notification[46186]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report

Thanks, I’ve pasted the text from the terminal after executing sudo journalctl -xe | grep abrt
Here it is again:

May 14 15:04:54 <user> abrt-server[43665]: Deleting problem directory ccpp-2024-05-14-15:04:53.726939-43629 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:04:54 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:04:54 <user> abrt-notification[43717]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report
May 14 15:08:33 <user> abrt-server[45853]: Deleting problem directory ccpp-2024-05-14-15:08:32.976636-45817 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:08:33 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:08:33 <user> abrt-notification[45905]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report
May 14 15:08:38 <user> abrt-server[46023]: Deleting problem directory ccpp-2024-05-14-15:08:37.927246-45986 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:08:38 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:08:38 <user> abrt-notification[46075]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report
May 14 15:08:43 <user> abrt-server[46134]: Deleting problem directory ccpp-2024-05-14-15:08:43.226816-46098 (dup of ccpp-2024-05-14-13:10:08.73897-9736)
May 14 15:08:43 <user> abrt-applet[5573]: g_app_info_should_show: assertion 'G_IS_APP_INFO (appinfo)' failed
May 14 15:08:43 <user> abrt-notification[46186]: Process 9736 (sudo) crashed in econf_read_file.constprop.0()
░░ Documentation: man:abrt(1)
░░ Use the abrt command-line tool for further analysis or to report

Have you messed around with your system’s Python installation?

Not that I know of. I just runned regular updates through Software center.

What about the error around packages pam and libpam - can you get that from the logs? (It’s partly visible in the screenshot above)

If the root password is set then you may be shooting yourself in the foot.
Anytime a user uses sudo the password required is that of the user issuing the sudo command. The root password would only be used when using su without using sudo.

How you are doing this is not stated, but if you have set the root password as noted above then are attempting to use sudo su and entering the root password at the prompt it may be causing your issue since pam cannot authenticate your user with sudo when the root password is entered (unless the passwords are identical for both your user and for root).

Using sudo requires the user password.
Using su requires the root password.

Perhaps is not relevant or related, but I saw one other strange thing, I can’t update one application, “Text Pieces”.

First time I’ve noticed “Segmentation fault (core dumped)” error is when I tried to remove this app from terminal because I assumed it’s broken or something and I wanted to remove it and install it again.

most likely unrelated.

sudo journalctl -xe | grep pam
sudo journalctl -xe | grep libpam

Here is the message for this package:

Process 42393 (sudo) of user 1000 dumped core.

Module pam_succeed_if.so from rpm pam-1.6.1-1.fc40.x86_64
Module libpam_misc.so.0 from rpm pam-1.6.1-1.fc40.x86_64
Module pam_systemd.so from rpm systemd-255.6-1.fc40.x86_64
Module pam_limits.so from rpm pam-1.6.1-1.fc40.x86_64
Module pam_keyinit.so from rpm pam-1.6.1-1.fc40.x86_64
Module libcrack.so.2 from rpm cracklib-2.9.11-5.fc40.x86_64
Module libpwquality.so.1 from rpm libpwquality-1.4.5-9.fc40.x86_64
Module pam_pwquality.so from rpm libpwquality-1.4.5-9.fc40.x86_64
Module pam_permit.so from rpm pam-1.6.1-1.fc40.x86_64
Module pam_deny.so from rpm pam-1.6.1-1.fc40.x86_64
Module pam_sss.so from rpm sssd-2.9.4-7.fc40.x86_64
Module libkeyutils.so.1 from rpm keyutils-1.6.3-3.fc40.x86_64
Module libkrb5support.so.0 from rpm krb5-1.21.2-5.fc40.x86_64
Module libcom_err.so.2 from rpm e2fsprogs-1.47.0-5.fc40.x86_64
Module libk5crypto.so.3 from rpm krb5-1.21.2-5.fc40.x86_64
Module libkrb5.so.3 from rpm krb5-1.21.2-5.fc40.x86_64
Module libgssapi_krb5.so.2 from rpm krb5-1.21.2-5.fc40.x86_64
Module libtirpc.so.3 from rpm libtirpc-1.3.4-1.rc3.fc40.x86_64
Module libnsl.so.3 from rpm libnsl2-2.0.1-1.fc40.x86_64
Module pam_unix.so from rpm pam-1.6.1-1.fc40.x86_64
Module pam_localuser.so from rpm pam-1.6.1-1.fc40.x86_64
Module pam_usertype.so from rpm pam-1.6.1-1.fc40.x86_64
Module libzstd.so.1 from rpm zstd-1.5.6-1.fc40.x86_64
Module liblzma.so.5 from rpm xz-5.4.6-3.fc40.x86_64
Module liblz4.so.1 from rpm lz4-1.9.4-6.fc40.x86_64
Module libsystemd.so.0 from rpm systemd-255.6-1.fc40.x86_64
Module pam_fprintd.so from rpm fprintd-1.94.2-11.fc40.x86_64
Module pam_faildelay.so from rpm pam-1.6.1-1.fc40.x86_64
Module pam_env.so from rpm pam-1.6.1-1.fc40.x86_64
Module libcap.so.2 from rpm libcap-2.69-8.fc40.x86_64
Module libnss_systemd.so.2 from rpm systemd-255.6-1.fc40.x86_64
Module libnss_sss.so.2 from rpm sssd-2.9.4-7.fc40.x86_64
Module libcrypt.so.2 from rpm libxcrypt-4.4.36-5.fc40.x86_64
Module libsasl2.so.3 from rpm cyrus-sasl-2.1.28-19.fc40.x86_64
Module libevent-2.1.so.7 from rpm libevent-2.1.12-12.fc40.x86_64
Module libeconf.so.0 from rpm libeconf-0.6.2-1.fc40.x86_64
Module libssl.so.3 from rpm openssl-3.2.1-2.fc40.x86_64
Module libpam.so.0 from rpm pam-1.6.1-1.fc40.x86_64
Module libz.so.1 from rpm zlib-ng-2.1.6-2.fc40.x86_64
Module libpcre2-8.so.0 from rpm pcre2-10.42-2.fc40.2.x86_64
Module libcap-ng.so.0 from rpm libcap-ng-0.8.4-4.fc40.x86_64
Module libcrypto.so.3 from rpm openssl-3.2.1-2.fc40.x86_64
Module libselinux.so.1 from rpm libselinux-3.6-4.fc40.x86_64
Module libaudit.so.1 from rpm audit-4.0.1-1.fc40.x86_64
Stack trace of thread 42393:
#0  0x00007f6de1f8b01f econf_read_file.constprop.0 (pam_env.so + 0x301f)
#1  0x00007f6de1f8b9bd handle_env (pam_env.so + 0x39bd)
#2  0x00007f6de1ec1c0f _pam_dispatch (libpam.so.0 + 0x9c0f)
#3  0x00007f6dd3b7d1e1 sudo_pam_begin_session (sudoers.so + 0x181e1)
#4  0x00007f6dd3b80bb1 sudoers_policy_init_session (sudoers.so + 0x1bbb1)
#5  0x0000562857b8ced3 n/a (/usr/bin/sudo + 0x1fed3)
#6  0x0000562857b81c79 n/a (/usr/bin/sudo + 0x14c79)
#7  0x0000562857b8c60f n/a (/usr/bin/sudo + 0x1f60f)
#8  0x0000562857b75e8f n/a (/usr/bin/sudo + 0x8e8f)
#9  0x00007f6de183d088 __libc_start_call_main (libc.so.6 + 0x2a088)
#10 0x00007f6de183d14b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a14b)
#11 0x0000562857b76fc5 n/a (/usr/bin/sudo + 0x9fc5)
ELF object binary architecture: AMD x86-64

and Documentation:

Process 42393 (sudo) crashed and dumped core.

This usually indicates a programming error in the crashing program and
should be reported to its vendor as a bug.

I don’t get anything in terminal from these command. I’ve been asked for root pass and when I enter it I just get blank line

Thank you for the explanation.

I’ve tried only su but I’ve got this:

Password: 
su: Authentication failure

My root and user passwords are the same. I’ve just tried in the Settings → Users to change my user password. First I’ve got prompted to enter root password, to unlock the user for changes, and then I used the same password to change the user password.

@augenauf , @computersavvy ,

Now I have another weird behavior. After I changed my user password I locked my laptop and I couldnt unlocked it. Fedora would not accept any password neither user nor root.

Luckily I’ve got “Automatic Login” set up so I had to hard reset my laptop in order to get in.
I’ve changed my password back to same one as before, but again I can’t login anymore from the lock screen…

How is this possible?

That first prompt is for the user password since the system automatically uses the users credentials to unlock those features within the settings panel. It works that way for me and has done so for years.

Please do not automatically assume that everytime you are asked for authentication it requires the root password. If it did them everyone would be required to set a root password and fedora does not force that nor encourage that for most users. Most users do everything for administration without ever unlocking the root account – they instead use sudo with their user password. This includes things such as you mention with the settings → users panel.

I understand, so this must be just user password, not a root password. Anyhow, It worked before but now, suddenly, I can’t do anything with sudo anymore.

If I enter wrong password after sudo su or sudo dnf or sudo ..., I got warning: Sorry, try again.
So my password for accessing sudo is correct, it’s just that sudo crashes.

I don’t know how this relates to the issue that I can’t login from lock screen anymore, password is just rejected as invalid right away, but when I enter wrong password on the log screen, it takes some time and then I got a bit different message for invalid password.