HOME BLOG

How to use sudo command without password

Posted on: September 17th, 2022 by Olu No Comments

Hi folks,

in this post I discuss how you can use sudo command without password on a Linux system.

Back up your sudoers file

cp /etc/sudoers /etc/sudoers.old

Then, run visudo command

visudo

 

Then enter an entry like

your-user-name ALL=(ALL) NOPASSWD: ALL

 

Then, if visuo uses nano, press Ctrl X to save. Then press enter to finish the save.

Please note: it’s not good security pracrice to let a non-root user run sudo without passwords, so you may want to limit it to some specific commands.

That’s all for now. Till next time, happy software development.

 

References

How to Use sudo Commands Without Password in Linux. https://www.makeuseof.com/using-sudo-without-password/

Leave a Reply