I am using Solaris 11 , I have added user to sudo user file ( /etc/sudoers) , still its prompting for password.
arcsys@solaris:~$ sudo -l
User arcsys may run the following commands on solaris:
(ALL) NOPASSWD: /usr/bin/cat
(ALL) ALL
arcsys@solaris:~$ sudo cat /etc/sudoers
Password:
I am not able to understand that what is wrong here? Any help is appreciated.
CodePudding user response:
The command you need to execute is:
sudo /usr/bin/cat /etc/sudoers
sudo
is strict when you have configured the full path to the program(s)
CodePudding user response:
As root, run:
visudo
and check to make sure your username is added
root ALL=(ALL:ALL) ALL
arcsys ALL=(ALL:ALL) ALL
Save, and quit, then run:
sudo "command"
The system will prompt you for YOUR password. If you have the proper access, it will run. If not, you will need to run visudo either as root, or by running sudo visudo.