How to deny a specific user to reboot or shut down with sudo [duplicate]

This question already has answers here: Editing sudoers file to restrict a user’s commands (9 answers) Closed 7 years ago. Hello and thanks for helping me in this question. I just have in /ets/sudoers something like this: # User Aliases User_Alias CLIENT = jhonny CLIENT myserver = ALL. !ADMIN_CMD,!SU I just want deny to jhonny … Read more

sudo -S sh -c “bash”

I have a script which opens terminal windows and sends commands to them. Some of these had to run as root so I would send them this command sudo sh -c ‘do_stuff && bash’ This would run some initial commands and then drop into an interactive shell. In my environment, the terminal programs themselves cannot … Read more

visudo + read access to file from non root user

how to access file by visudo from non root user , or other option for example when we change user to hdfs and from user hdfs we want to print the file – file.cfg we get Permission denied how to configure the visudo in order to get read access from user – hdfs ( and … Read more