๐sudo policies
Begining with this section, we will create a file in /etc/sudoerd.d/ . The file will serve the purpouse of storing our sudo policy.
The command that we will use will be
touch /etc/sudoers.d/sudo_config

Then we must create a directory as is asked in the subject in /var/log/ because each commands need to be logged, the input and output. We will use:
mkdir /var/log/sudo

We must edit the file that we created in the first step of this section. Use any text editor, but for this guide as is in every screenshot we will use nano. Use:
nano /etc/sudoers.d/sudo_config

Once we are editing the file we must set it up with the following commands:
Defaults passwd_tries=3
Defaults badpass_message="Mensaje de error personalizado"
Defaults logfile="/var/log/sudo/sudo_config"
Defaults log_input, log_output
Defaults iolog_dir="/var/log/sudo"
Defaults requiretty
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
As it should be on the file:
Last updated
Was this helpful?