Sudo Password
Note
This page explains enabling the sudo password
for the Chef Automate High Availability (HA) deployment.
If you have configured the sudo password for the user, you need to create an environment variable sudo_password and set the password as the variable’s value. Example: export sudo_password=YOUR_SUDO_PASSWORD
. Once its done, run all sudo commands with the sudo -E
or --preserve-env
option. Example: sudo -E chef-automate iam version
. This is required for the chef-automate CLI to run the commands with sudo privileges.
Steps to Enable Sudo Password
To enable the sudo password
for the Chef Automate HA deployment, follow the steps below:
Create a
sudo_password
environment variable. Example:export sudo_password=1234
.Pass the
sudo_password
environment variable to thechef-automate
CLI commands. Example:sudo -E chef-automate iam version
.a. To pass all your environment variables, including the
sudo_password
to thechef-automate
CLI commands, you can use the-E
or--preserve-env
option. Example:sudo -E chef-automate iam version
orsudo --preserve-env chef-automate iam version
.b. To pass the
sudo_password
environment variable to thechef-automate
CLI commands, you can supply the environment variable name to the--preserve-env
argument. Example:sudo --preserve-env=sudo_password chef-automate iam version
.You can also set environment variables directly in the sudo command. Example:
sudo sudo_password=1234 chef-automate iam version
.
Pass the sudo_password
environment variable to all the chef-automate
CLI commands.