From ff360aa30a96bf945308282ca61706d09d46129a Mon Sep 17 00:00:00 2001 From: Sun Austin Date: Mon, 10 Dec 2018 10:11:43 +0800 Subject: [PATCH] update /etc/pam.d/system-auth content with system-auth.pam LDAP sudo user is not able to login by password. root cause is that password rules in system-auth is not updated correctly because system-auth.apm in pam-config is missed to be copied to /etc/pam.d/system-auth copy system-auth.pam in pam-config to /etc/pam.d/system-auth to solve this issue. Closes-Bug: #1806977 Change-Id: Ic646e30d06bcbe8cf3bf66c903942e4240bd23bd Signed-off-by: Sun Austin --- config-files/pam-config/centos/build_srpm.data | 2 +- config-files/pam-config/centos/pam-config.spec | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config-files/pam-config/centos/build_srpm.data b/config-files/pam-config/centos/build_srpm.data index da1e20bd8..2c3b2cb8b 100644 --- a/config-files/pam-config/centos/build_srpm.data +++ b/config-files/pam-config/centos/build_srpm.data @@ -1,2 +1,2 @@ SRC_DIR="files" -TIS_PATCH_VER=0 +TIS_PATCH_VER=1 diff --git a/config-files/pam-config/centos/pam-config.spec b/config-files/pam-config/centos/pam-config.spec index 369afd50b..4508f9e08 100644 --- a/config-files/pam-config/centos/pam-config.spec +++ b/config-files/pam-config/centos/pam-config.spec @@ -15,23 +15,31 @@ Summary: package StarlingX configuration files of pam to system folder. %description package StarlingX configuration files of pam to system folder. +%define _pamconfdir %{_sysconfdir}/pam.d + %prep %setup %build %install -%define _pamconfdir %{_sysconfdir}/pam.d %{__install} -d %{buildroot}%{_pamconfdir} +%{__install} -d %{buildroot}%{_datadir}/starlingx %{__install} -m 644 common-account %{buildroot}%{_pamconfdir}/common-account %{__install} -m 644 common-auth %{buildroot}%{_pamconfdir}/common-auth %{__install} -m 644 common-password %{buildroot}%{_pamconfdir}/common-password %{__install} -m 644 common-session %{buildroot}%{_pamconfdir}/common-session %{__install} -m 644 common-session-noninteractive %{buildroot}%{_pamconfdir}/common-session-noninteractive +%{__install} -m 644 system-auth.pamd %{buildroot}%{_datadir}/starlingx/stx.system-auth %post +if [ $1 -eq 1 ] ; then + # Initial installation + cp -f %{_datadir}/starlingx/stx.system-auth %{_pamconfdir}/system-auth +fi %files +%{_datadir}/starlingx/stx.system-auth %config(noreplace) %{_pamconfdir}/common-account %config(noreplace) %{_pamconfdir}/common-auth %config(noreplace) %{_pamconfdir}/common-password