Regain access to the Administrator account in Terraform Enterprise.
- Terraform Enterprise: all releases
- You are unable to login as the Administrator to your Terraform Enterprise instance.
- Promoting another account as Site Admin is not an option.
SSH into your Terraform Enterprise instance.
- Launch the Rails console.
For Terraform Enterprise v202205-1 or later:
sudo docker exec -it ptfe_atlas /usr/bin/init.sh /app/scripts/wait-for-token -- bash -i -c 'cd /app && ./bin/rails c'
sudo docker exec -it tfe-atlas /usr/bin/init.sh /app/scripts/wait-for-token -- bash -i -c 'cd /app && ./bin/rails c'
Find the Administrator account and store it in the user variable.
user = User.find_by(username: 'administrator')
Store the password you want to use in the new_password variable. Password requires 10 characters minimum.
new_password = 'yournewadminpass'
- Change the Administrator password and confirm it.
user.password = 'new_password' user.password_confirmation = 'new_password'
- Save your changes and exit the Rails console.
- You should now be able to login via the Terraform Enterprise Web UI with your new password. If two factor authentication was setup for the Administrator account you will be prompted for the code.