diff --git a/deploy/classic/prepare-auth.py b/deploy/classic/prepare-auth.py index 9d1488a..eedae10 100644 --- a/deploy/classic/prepare-auth.py +++ b/deploy/classic/prepare-auth.py @@ -14,7 +14,10 @@ def main(root): account_file=root/'classic-gm-credentials.json' if account_file.exists():gm=json.loads(account_file.read_text()) else: - gm={'username':'AZCLASSICGM','password':secrets.token_hex(8)} + gm={'username':'AZAIADMIN','password':secrets.token_hex(8)} + account_file.write_text(json.dumps(gm));account_file.chmod(0o600) + if gm['username'].startswith('AZCLASSIC'): + gm['username']='AZAIADMIN' account_file.write_text(json.dumps(gm));account_file.chmod(0o600) salt=secrets.token_bytes(32) digest=hashlib.sha1((gm['username'].upper()+':'+gm['password'].upper()).encode()).digest()