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
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'
- For Terraform Enterprise
v202309-1and above running in
sudo docker exec -it terraform-enterprise tfectl support console
Find the Administrator account and store it in the user variable.
user = User.find_by(username: 'administrator')
Change the password for the user. Password requires 10 characters minimum.
user.password = 'yournewadminpass'
- 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.