-- Leo's gemini proxy

-- Connecting to darknesscode.xyz:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

No password with Sudo


I like to run some sudo commands with enter everytime my password.


There are a few ways to doing it, one is editing the sudoers file with visudo like so:


sudo visudo

Check if this two lines are In the file


## Read drop-in file from /etc/sudoers.d
@includedir /etc/sudoers.d

That means that every file we created inside the sudoers.d directory it will be read for the sudoers file


sudoers.d


Create a new file, Example


sudo visudo -f /etc/sudoers.d/killall

Now in our new file add (replace user with the real username)


user ALL=NOPASSWD: /usr/bin/killall

Save and close. This should work out of the box, run a program and kill it with


sudo killall <program>

Now you will see that the program is terminated without asking for your root password


----------


Home

Linux

Notes

MicroLog


----------


© DarknessCode

-- Response ended

-- Page fetched on Tue May 21 16:23:36 2024