I enjoy using Linux because I am a tinkerer by nature, however the extra security that comes with it can be rather cumbersome at times, especially when running scripts.

One of the peeve I have is being asked for admin password whenever I make changes or run custom scripts, and I do a lot of both.

Before proceeding, this is the only warning I will give you:

This is a dangerous practice as you may inadvertently delete or change system files. After all, this is one of the features that makes Linux safer. I have done it. Let me tell you it’s no fun reinstalling from scratch. One thing I have learned from making this mistake is to make backups of all your important stuff and the best way to approach this is to ask yourself: “If I lost my Linux computer today, what would I miss the most?” Back that shit up!

Well, that goes with any computer system actually. 

Remember this quote: “Jesus saves but everyone else has to do backups.

So, now that you have been warned, here is how to create a Linux user without being asked for a Sudo password. We simply need to edit one file, it is located here: /etc/sudoers.  Before you get carried away and open it with your preferred text editor, there is a special tool to do this, it’s called ‘visudo‘, so you just type:

sudo visudo

After you enter your Sudo password for the last time, all you need to do is scroll to the end of the file and enter the following text:

# Uncomment to allow members of group sudo to not need a password

Again, this may not be the most safe or secure way of doing things, but if you are OK with the risks, all you have to do is reboot and voilà! No more password to enter when running scheduled software updates scripts!




2 thoughts on “How to make a Linux Sudo user without a password

    1. I agree. I find that the only time I really need this feature is when I install from scratch. The best practice is to change to super user until you are done. I did need this for running some scripts on a C.H.I.P., I’m really not worried if this one gets hacked…

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s