set_password_for_bruno.sh #1

  • //
  • guest/
  • perforce_software/
  • sdp/
  • main/
  • test/
  • bsw/
  • set_password_for_bruno.sh
  • View
  • Commits
  • Open Download .zip Download (480 B)
#!/bin/bash
set -u

# Make it so user has a password.
# Start state: Bruno may or may not already have a password set.
# Just attempt to set it and ignore errors if already set.

declare SDPInstance=${1:-${SDP_INSTANCE:-1}}

# shellcheck disable=SC1091
source /p4/common/bin/p4_vars "$SDPInstance"

echo "As user $P4USER, setting password for user bruno."
yes "$(cat "$SDP_ADMIN_PASSWORD_FILE")" | p4 -s passwd bruno

echo "Logging in bruno after password change."
p4 login bruno
# Change User Description Committed
#1 31566 C. Thomas Tyler Released SDP 2024.2.31564 (2025/05/14).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
//guest/perforce_software/sdp/dev/test/bsw/set_password_for_bruno.sh
#2 31547 C. Thomas Tyler SDP BSW regression test suite refinements.
#1 31521 C. Thomas Tyler Refined tests for ccheck.sh with -sec.
Added more tests for -fix/-FIX.

Refined scan for unreported test errors to ignore known harmless
warnings.

Added utility script to set password and login bruno, as needed when
messing with security configurations.