Backend DevOps Linux

Linux disable sudo password prompt in terminal (Critical security issue, only use on dev machines)

While we are working on linux systems, terminal is daily driver, sudo is one of most commonly used command.
But what if you have long password, like 10 or 20 characters long?

We can bypass sudo password prompt by changing sudo settings.

#> sudo visudo

This will open sudo configuration file with text editor like vi or nano.
Go to end of this file and add your user, in this example, `administrator` is user name

... # file content
administrator ALL=(ALL) NOPASSWD:ALL

Save file and exit.

Viola, now terminal will not ask password for your sudo powered commands.

There are critical security risks here, so please use at your own risks.

Stan

Stan is an experienced full-stack developer and software engineer who is focused on web and game development. He is enthusiastic about new technologies. Stan is highly skilled in many programming languages and frameworks, and he always tries to deliver the best approach.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *