Running sudo commands during a deployment

There may be occasions where you need to run sudo commands during a deployment.

Because the deployment process is non-interactive, it’s not possible to provide a password when running SSH commands, however, we can recommend creating a specific entry in your sudoers file to allow the deployment user to run only the necessary commands, and to do so without a password.

If you place the following line in your /etc/sudoers file, replacing “username” with the username of the deployment user, and “command” with the full command that needs to be executed, then this user will be able to use sudo to execute only this command and do so without needing a password.

username ALL=(ALL) NOPASSWD:command

Leave a Reply

Your email address will not be published. Required fields are marked *

Offer available till 15th July 2020 and Only 50 Coupons left!

Creating apps that helps to improve your productivity with minimal efforts!

Terms & conditions

* Discount applicable only on Ultim8e Deployer.

WE ACCEPT

©2020, Ultim8e.com. All Rights Reserved. Powered by Ingress IT Solutions

GO TOP