Update re2o-service password #12

Merged
ynerant merged 1 commit from change-password into master 2021-02-05 22:19:31 +01:00
Contributor

It's a good pratice to change periodically a password. This is the main reason that the re2o-service password got changed. Yes.

This script is working to deploy it everywhere:

#!/bin/bash
set -e

# Grab valid unique hostnames from the Ansible inventory.
HOSTS=$(grep -ve '^[#\[]' hosts \
| grep -F adm.auro.re \
| sort -u)

# Ask password
read -s -p "What is your LDAP password? " passwd
echo
read -s -p "What is the Re2o-service password? " re2o_passwd
echo


SU_CMD="sed  's/password = .*/password = $re2o_passwd/' /var/local/re2o-services/config.ini > /tmp/toto && mv /tmp/toto /var/local/re2o-services/config.ini"
CMD="sudo -S su -c \"$SU_CMD\""

echo $CMD

for host in $HOSTS; do
  echo "[+] Handling host $host";
  echo $passwd | ssh $host $CMD || true
done

Signed-off-by: ynerant ynerant@crans.org

It's a good pratice to change periodically a password. This is the main reason that the re2o-service password got changed. Yes. This script is working to deploy it everywhere: ``` #!/bin/bash set -e # Grab valid unique hostnames from the Ansible inventory. HOSTS=$(grep -ve '^[#\[]' hosts \ | grep -F adm.auro.re \ | sort -u) # Ask password read -s -p "What is your LDAP password? " passwd echo read -s -p "What is the Re2o-service password? " re2o_passwd echo SU_CMD="sed 's/password = .*/password = $re2o_passwd/' /var/local/re2o-services/config.ini > /tmp/toto && mv /tmp/toto /var/local/re2o-services/config.ini" CMD="sudo -S su -c \"$SU_CMD\"" echo $CMD for host in $HOSTS; do echo "[+] Handling host $host"; echo $passwd | ssh $host $CMD || true done ``` Signed-off-by: ynerant <ynerant@crans.org>
ynerant added 1 commit 2021-02-05 22:19:13 +01:00
Update re2o-service password
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
4ecb6ed7be
Signed-off-by: ynerant <ynerant@crans.org>
ynerant merged commit 71d7358bd7 into master 2021-02-05 22:19:31 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: aurore/ansible#12
No description provided.