Skip to content

Commit

Permalink
cleanup: suppress output when assigning root pw (#4277)
Browse files Browse the repository at this point in the history
Co-authored-by: Zachary Bailey <[email protected]>
  • Loading branch information
zachary-bailey and Zachary Bailey authored Apr 12, 2024
1 parent 1455846 commit 5bcc3cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parts/linux/cloud-init/artifacts/cis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source /home/packer/provision_source.sh

assignRootPW() {
set +x
if grep '^root:[!*]:' /etc/shadow; then
VERSION=$(grep DISTRIB_RELEASE /etc/*-release | cut -f 2 -d "=")
SALT=$(openssl rand -base64 5)
Expand All @@ -16,6 +17,7 @@ assignRootPW() {

echo 'root:'$HASH | /usr/sbin/chpasswd -e || exit $ERR_CIS_ASSIGN_ROOT_PW
fi
set -x
}

assignFilePermissions() {
Expand Down
2 changes: 2 additions & 0 deletions pkg/templates/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5bcc3cd

Please sign in to comment.