Reset Chef Automate Dashboard Credentials - AWS OpsWorks

Reset Chef Automate Dashboard Credentials

Important

AWS OpsWorks for Chef Automate is no longer accepting new customers. Existing customers will be unaffected until May 5, 2024 at which time the service will become unavailable. We recommend that existing customers migrate to Chef SaaS or an alternative solution. For more information, see AWS OpsWorks for Chef Automate End of Life FAQs.

Periodically, you might want to change the password with which you sign in to the Chef Automate dashboard. You can also use the Amazon EC2 Systems Manager AWS CLI commands shown in this section to change the Chef Automate dashboard password if you have lost it. The command you use depends on whether your Chef Automate server is running version 1 or version 2 of Chef Automate.

  1. To return the instance ID of your Chef server, open the AWS Management Console to the following page.

    https://console.aws.amazon.com/ec2/v2/home?region=region_of_your_server#Instances:search=aws-opsworks-cm-server_name

    For example, for a Chef server named MyChefServer in the US West (Oregon) Region, the console URL would be the following.

    https://console.aws.amazon.com/ec2/v2/home?region=us-west-2#Instances:search=aws-opsworks-cm-MyChefServer

    Make a note of the instance ID that is displayed in the console; you will need it to change your password.

  2. To reset the Chef Automate dashboard sign-in password, run one of the following AWS CLI commands, depending on whether your server is running Chef Automate 1 or Chef Automate 2. Replace enterprise_name with your enterprise or organization name, user_name with the user name of an administrator on the server, new_password with the password you want to use, andregion_name with the region in which your server is located. If you do not specify an enterprise name, the enterprise name will be default. By default, enterprise_name is default (this is the name of the organization that is always provisioned). For user_name, AWS OpsWorks for Chef Automate only creates a user named admin. Make a note of the new password, and store it in a safe but convenient location.

    For Chef Automate 1:

    aws ssm send-command --document-name "AWS-RunShellScript" --comment "reset admin password" --instance-ids "instance_id" --parameters commands="sudo delivery-ctl reset-password enterprise_name user_name new_password" --region region_name --output text

    For Chef Automate 2:

    aws ssm send-command --document-name "AWS-RunShellScript" --comment "reset admin password" --instance-ids "instance_id" --parameters commands="sudo chef-automate iam admin-access restore new_password" --region region_name --output text
  3. Wait for output text (in this case, the command ID) to show that the password change is finished.