Answer the question
In order to leave comments, you need to log in
How to disable sudo to a specific user?
How to disable sudo to a specific user?
Answer the question
In order to leave comments, you need to log in
Do not allow this user to runas
Or do you have a user who can sudo su - do? So you won’t forbid anything, because after sudo su - he is a root that can do everything
Try to look in the direction of pam.d, it controls the logic of how sudo works, I think there should be a module to block the action according to your criteria. And if not, then there is an example on the net of how to write such a module yourself (in c++).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question