K
K
k1ttyhawk2021-07-05 11:44:55
*nix-like systems
k1ttyhawk, 2021-07-05 11:44:55

How to restrict paths for sudo?

You need to restrict paths for the sudo group: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/snap/bin
How to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CityCat4, 2021-07-05
@CityCat4

I didn’t understand the question - is it necessary that when executing a command through sudo there are only the specified paths? If yes, then set accordingly Defaults secure_path in /etc/sudoers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question