mirror of
https://github.com/ovh/the-bastion.git
synced 2025-02-25 16:13:38 +08:00
fix: generation of MFA secret under FreeBSD
This commit is contained in:
parent
867410a16d
commit
e2a45596d0
1 changed files with 1 additions and 1 deletions
|
@ -1272,7 +1272,7 @@ if [ "${opt[generate-mfa-secret]}" = 1 ]; then
|
|||
if [ -e "$BASTION_ETC_DIR/mfa-token.conf" ]; then
|
||||
action_na
|
||||
else
|
||||
secret=$(tr -dc A-Za-z0-9 < /dev/urandom 2>/dev/null | head -c32)
|
||||
secret=$(env LANG=C tr -dc A-Za-z0-9 < /dev/urandom 2>/dev/null | head -c32)
|
||||
touch "$BASTION_ETC_DIR/mfa-token.conf"
|
||||
chown 0:bastion-users "$BASTION_ETC_DIR/mfa-token.conf"
|
||||
chmod 640 "$BASTION_ETC_DIR/mfa-token.conf"
|
||||
|
|
Loading…
Reference in a new issue