on kubuntu 20lts
sudo sh -c ' echo "ALL ALL=(NOPASSWD: /usr/bin/kill" >> /etc/sudoers'
I have some machines with Kubuntu 20.04 LTS, everyday when the machines start, and the users login, smb4k mounts shares. But sometimes some shares dont mount because mounthelper hangs up. I need to allow all users to execute the kill command in a bash script to remote them All the shares.
But it doesn't work... -bash: kill: (1709) - operation not permitted The process is owned by root What I'm doing wrong?
kill
command. Can you be more specific and give some examples of the actual problems you are experiencing? – Nmath Jun 10 '21 at 17:10kill
is located in/bin/kill
not/usr/bin/kill
. Giving anyone possibility to kill any process is from security reasons a bad idea. Maybe allow only specific users or group. – Mateusz Jun 10 '21 at 17:40/bin
is symlinked tousr/bin
so that is as expected. – vanadium Jun 10 '21 at 18:10/bin
and/usr/bin
– Mateusz Jun 10 '21 at 19:19kill
in a terminal, you're likely getting your shell's builtinkill
command, rather than an external executable/bin/kill
or/usr/bin/kill
. When you runsudo kill
you will get the external command. – steeldriver Jun 11 '21 at 01:01