bad entry in /etc/pam.d/system-auth file

0

We recently installed AL2 and found a bad entry in the /etc/pam.d/system-auth file. The offending line looked as follows (contains leading dash):

-session optional pam_systemd.so


Not sure how to proceed to get this fixed? It does cause the following error during certain sudo commands:

sudo: PAM (sudo) illegal module type: -session

kerryd
asked 4 years ago264 views
2 Answers
0
Accepted Answer

The entry which is specified is not a bad entry, it is used
"If a line in the configuration file starts with a dash, the error isn't logged. This can be useful for modules that may not be present, for example, a module for fingerprint authentication may not be present, but if it is, it should be used."
Take a look at these:
https://www.redhat.com/archives/pam-list/2009-October/msg00028.html
http://wpollock.com/AUnix2/PAM-Help.htm
What commands are you running which cause these errors?

ssuryad
answered 4 years ago
0

Hi,
Thanks for the explanation. That makes sense now.

FWIW. the command was running in a script and looked something like the following:

sudo -u $run_as_user $actual_env_path/setup_handler_cache

kerryd
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions