Most of the recent Linux distributions use sudo utility as a way to grant non-privileged users execute processes as privileged root users. By default 5 minutes is granted to a sudo user to enter privileged commands using sudo without password after first authentication. If you wish to give your users an access to run privileged command without password follow the instructions below.

First, assign user to a specific group. For example user on Fedora or Redhat systems by default belong to user group wheel.
$ id lubos
uid=1000(lubos) gid=1000(lubos) groups=1000(lubos),10(wheel)

In the example below we add user lubos to a new group called sudoers:
# groupadd sudoers 
# usermod -G sudoers lubos
# id lubos
uid=1000(lubos) gid=1000(lubos) groups=1000(lubos),1002(sudoers)
Now we need to edit /etc/sudoers the sudo config file to allow all users belonging to sudoers group to use sudo without password. For this we will use visudo command and add the following line:
%sudoers        ALL=NOPASSWD: ALL

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top