I add this line to visudo
, in order to give full permissions to yael user:
yael ALL=(ALL) NOPASSWD: ALL
But when I want to update the /etc/hosts
file, I get permission denied:
su – yael
echo "10.10.10.10 yael_host">>/etc/hosts
-bash: /etc/hosts: Permission denied
sudo echo "10.10.10.10 yael_host">>/etc/hosts
-bash: /etc/hosts: Permission denied
ls -ltr /etc/hosts
-rw-r--r--. 1 root root 185 Aug 7 09:29 /etc/hosts
How can I give to user yael ability like root?
%sudo ALL=(ALL:ALL) ALL
Give all users in group sudo the rights. P:S If you like full granted rights. for comd-toolssudo -s
– Aug 07 '17 at 10:48