SUSE Support

Here When You Need Us

PAM is not working and reports error: Failed at step PAM spawnin ... Operation not permitted

This document (7023782) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12

Situation

Server was upgraded from SLES 11 SP4 to SLES 12 SP3 | SP4. The /var/log/messages contains a lot of messages e.g. 
 
Failed at step PAM spawning /usr/lib/systemd/systemd: Operation not permitted
Failed at step PAM spawning /usr/lib/systemd/systemd: Operation not permitted
Failed at step PAM spawning /usr/lib/systemd/systemd: Operation not permitted
Failed at step PAM spawning /usr/lib/systemd/systemd: Operation not permitted
 

Resolution

The above issue can be fixed by replacing pam_unix2 with pam_unix.  
After upgrade, search for new PAM related configuration (/etc/pam.d/*.rpmnew) and move them. E.g. 
 
Save the current files:
cp /etc/pam.d/common-account /etc/pam.d/common-account.backup
cp /etc/pam.d/common-auth /etc/pam.d/common-auth.backup
cp /etc/pam.d/common-password /etc/pam.d/common-password.backup
cp /etc/pam.d/common-session /etc/pam.d/common-session.backup
 
Then, use the newer pam files:
cp /etc/pam.d/common-account.rpmnew /etc/pam.d/common-account
cp /etc/pam.d/common-auth.rpmnew /etc/pam.d/common-auth
cp /etc/pam.d/common-password.rpmnew /etc/pam.d/common-password
cp /etc/pam.d/common-session.rpmnew /etc/pam.d/common-session

Another cause for this problem happens when the user doesn't have an entry in /etc/shadow file. 

Cause

SLES 12 uses pam_unix by default but SLES 11 is using pam_unix2.
This error comes from PAM, please double check PAM configuration.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7023782
  • Creation Date: 20-Mar-2019
  • Modified Date:14-Dec-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.