mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-22 00:43:09 +01:00
Unset pw reset for new Fleet users
This commit is contained in:
@@ -32,6 +32,7 @@ fi
|
||||
USER_EMAIL=$1
|
||||
FLEET_SA_EMAIL=$(lookup_pillar_secret fleet_sa_email)
|
||||
FLEET_SA_PW=$(lookup_pillar_secret fleet_sa_password)
|
||||
MYSQL_PW=$(lookup_pillar_secret mysql)
|
||||
|
||||
# Read password for new user from stdin
|
||||
test -t 0
|
||||
@@ -61,4 +62,8 @@ else
|
||||
echo "Unable to add user to Fleet; user might already exist"
|
||||
echo "$CREATE_OUTPUT"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable forced password reset
|
||||
MYSQL_OUTPUT=$(docker exec so-mysql mysql -u root --password=$MYSQL_PW fleet -e \
|
||||
"UPDATE users SET admin_forced_password_reset = 0 WHERE email = '$USER_EMAIL'" 2>&1)
|
||||
Reference in New Issue
Block a user