Introduction
Expected Outcome
Change Administrator E-mail in Terraform Enterprise which is greyed out in admin setting page.
Prerequisites
- Terraform Enterprise
 
Use Case
- You no longer have access to the Administrator email configured.
 - Promoting another account as Site Admin is not an option.
 
Procedure
- 
SSH into your Terraform Enterprise instance.
 - Launch the Rails console.  
For Terraform Enterprisesudo docker exec -it ptfe_atlas /usr/bin/init.sh /app/scripts/wait-for-token -- bash -i -c 'cd /app && ./bin/rails c'v202205-1throughv202308-1: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 inconsolidated_servicesmode:sudo docker exec -it terraform-enterprise tfectl support console
 - 
Find the Administrator account and store it in the user variable.
user = User.find_by(email: 'administrator@email.com') - 
Change the email for the user. The email address must not be currently in use by any other user.
user.email = 'yournewadminemail@email.com' - Save your changes and exit the Rails console.
user.save!
exit - You should now be able to see the new email in the admin setting in Terraform Enterprise Web UI.