this is my first post in the forum, i having issues execute commands without password
, all requirement has been done but still can not run any sudo commands without password, and here is my sudo configuration look like
user name: ansible
OS: CentOS 7.4
environment: test
this "ansible" has been added to the wheel group, i can run all sudo commands with no issues, but when i added the user to the sudoers file to run commands without password its doesn't work, its work only if i add the entire wheel group but not the user, i just want this user only to run all sudo command without password, not sure what wrong, being trying to figure out what the issues since last week but no luck, any help will be appreciated, and here is what the sudoers file look like.
Code: Select all
## user MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.
##
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
ansible ALL=(ALL) NOPASSWD: ALL
## Allows members of the 'sys' group to run networking, software,
## service management apps and more.
# %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
## Same thing without a password
#%wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
~