Thomas' Tech Tips

Allow password-less sudo to a specific user

29 April 2025 - Thomas Damgaard

Here is how to allow a specific user to use sudo without being prompted for password

echo 'myuser ALL=(root) NOPASSWD: ALL' > /tmp/myuser
visudo -cf /tmp/myuser
chmod 0600 /tmp/myuser
mv /tmp/myuser /etc/sudoers.d/
Filed under: howto, tips

Back to article list