**"sudo: a password is required" Error Persisting**

“sudo: a password is required” Error Persisting

Hello OpenNebula Community,
Problem Description: In the logs, I observe the error message “sudo: a password is required” when attempting certain OpenNebula commands. This issue is critical for my deployment as it is preventing normal operation.
Steps Taken:

  • Checked and modified the sudoers file to grant necessary privileges without requiring a password.
  • Ensured that the commands executed by OpenNebula do not prompt for a password.
  • Verified the execution environment and tested commands manually.

Despite these efforts, the problem persists, and I am seeking guidance from the community.

Hello!

Could you, please, specify the following:
what OS is used on virtualization nodes (cluster nodes, CN)?
what opennebula packages you have installed on CN?
what is the output of the following command:

grep -i oneadmin -r /etc/sudoers.d/

For the OS, I used Debian, and the virtualization node is LXC. Here are the results obtained with the command grep -i oneadmin -r /etc/sudoers.d/

/etc/sudoers.d/opennebula-server:oneadmin ALL=(ALL) NOPASSWD: ONE_CEPH, ONE_HA, ONE_MARKET, ONE_LVM
/etc/sudoers.d/opennebula:Defaults:oneadmin !requiretty
/etc/sudoers.d/opennebula:Defaults:oneadmin secure_path = /sbin:/bin:/usr/sbin:/usr/bin
/etc/sudoers.d/opennebula:# oneadmin ALL=(ALL) NOPASSWD: ONE_CEPH, ONE_FIRECRACKER, ONE_HA, ONE_LVM, ONE_LXC, ONE_LXD, ONE_MARKET, ONE_NET, ONE_OVS, ONE_MEM

If you install opennebula from packages provided for you OS e.g. following that guide there is no need to modify any sudoers files manually.

Could you, please, double check there is no oneadmin user related entries in you /etc/sudoers* files and directories apart from opennebula ones (/etc/sudoers.d/opennebula*)?