Enabling sudo usage without being asked to enter the password

In this post we will take care of one important thing related to Cloudera CDH cluster setup – there is a requirement that on all nodes of the cluster Cloudera Manager should be able to execute sudo commands without being asked to enter a password. I will guide you through how to do that. These actions should be performed on each node of the cluster.

In console execute the following command:

sudo visudo

Since we have not setup yet password-less sudo, you will be asked to enter password. Once the file is opened, add the following line to it:


Instead of dmitrijsf you should specify your username for which you would like to disable password check. To save and exit press CTRL + X and when asked if you want to the the results press Y

To clear all historical sudo related cache, execute

sudo -k

After that, execute any command using sudo, this time you should be asked for any password.

In the next post we will finally take care of installing Cloudera Manager agents on all nodes of our cluster.

If you still have any questions or something is not clear, do not hesitate to ask in the comments 🙂

Leave a Reply