Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

Sudoers file and sudo tips

Date: 2010-12-07 00:00:00 -0400

tips

Introduction

sudoers file, is one of the most visited articles at Go2Linux.org, so I’m going to expand a little bit that article, by adding this small tips about sudoers file and sudo command.

Grant root powers

To a single user

Add to the sudoers file

[user]  ALL=(ALL) ALL

Example:

john    ALL=(ALL) ALL

To a group of users

The users need to belong to the given group, you can add the user to a group. Then add this to the sudoers file

[group] ALL=(ALL) ALL

Example:

%wheel  ALL=(ALL) ALL

Avoid writing sudo every time

If you need to run a lot of programs as root, invoke a shell as root.

sudo bash

Then you can execute all the commands as root, without the need to write sudo each time, when you are finished do not forget to exit from that shell.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.