Fabian Deutsch has uploaded a new change for review. Change subject: Revert "ovirt-init-functions: validation /etc/profile" ......................................................................
Revert "ovirt-init-functions: validation /etc/profile" This reverts commit 2dea5de85ce567a8b87956b6b8d87e8a36083e37. Change-Id: I38b20c795b5f8847e42c1aef31b140eea604e62e Signed-off-by: Fabian Deutsch <[email protected]> --- M scripts/ovirt-init-functions.sh.in 1 file changed, 6 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/39/47239/1 diff --git a/scripts/ovirt-init-functions.sh.in b/scripts/ovirt-init-functions.sh.in index b87094b..ece5ed1 100644 --- a/scripts/ovirt-init-functions.sh.in +++ b/scripts/ovirt-init-functions.sh.in @@ -962,13 +962,12 @@ fi # check if root or admin password is expired, this might be upon reboot # in case of automated installed with rootpw or adminpw parameter! - if ! grep -q "sudo persist /etc/passwd /etc/shadow" /etc/profile; then - if LC_ALL=C chage -l root | grep -q "password must be changed" \ - || LC_ALL=C chage -l admin | grep -q "password must be changed"; then - unmount_config /etc/passwd /etc/shadow - # PAM will force password change at first login - # so make sure we persist it after a successful login - cat >> /etc/profile << EOF + if LC_ALL=C chage -l root | grep -q "password must be changed" \ + || LC_ALL=C chage -l admin | grep -q "password must be changed"; then + unmount_config /etc/passwd /etc/shadow + # PAM will force password change at first login + # so make sure we persist it after a successful login + cat >> /etc/profile << EOF # added by ovirt-early if [ "\$USER" = "root" -o "\$USER" = "admin" ]; then sudo persist /etc/passwd /etc/shadow @@ -978,7 +977,6 @@ fi fi EOF - fi fi if [ "$rescue" = 1 ]; then -- To view, visit https://gerrit.ovirt.org/47239 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I38b20c795b5f8847e42c1aef31b140eea604e62e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Fabian Deutsch <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
