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

If you report that bug using ABRT, the Automatic Bug Report Tool, you will see if the issue has been reported already. That may help you find the cause and workaround and it will help developers find and fix the issue. See if you can report the bug, generate and share a backtrace with the devs.

To use ABRT, you need to login to bugzilla.redhat.com, generate an API key, and provide that API key to ABRT.

Thanks, I already did report the bug about sudo crashing.

Now I’m struggling to understand why I can’t login to the admin user after I changed the password. Any idea on that?

The crash is in a pam function. From the name I’m guessing there could a problem with the content or permissions of /etc/security/pam_env.conf. That is a text file with extensive comments, but the default configuration has all lines starting with a # character:

% ls -l /etc/security/pam_env.conf
-rw-r--r--. 1 root root 2971 Jan 17 06:29 /etc/security/pam_env.conf
% md5sum /etc/security/pam_env.conf
89cc8702173d5cd51abc152ae9f8d6bc  /etc/security/pam_env.conf

All lines in /etc/security/pam_env.conf are starting with #

Also look at /etc/environment and $HOME/.pam_environment.

1 Like

In /etc/environment i just have /snap/bin and I don’t have file ~/.pam_environment

Looks like /etc/environment is a problem. Read man 8 pam_env:

The syntax are simple KEY=VAL pairs on separate lines.

indeed pam crashes when /etc/environment does not respect the KEY=VAL syntax.
reporting it on segmentation fault when /etc/environment contains key without value · Issue #796 · linux-pam/linux-pam · GitHub where a recent commit is triggering the bug, and on econf_getStringValue return success with NUL result · Issue #208 · openSUSE/libeconf · GitHub which is where the issue seems to come from.