Skip to content

Commit

Permalink
Add sudo-related commands
Browse files Browse the repository at this point in the history
  • Loading branch information
rosenfeld committed Jun 4, 2011
1 parent 079e34f commit ea0fb0c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions en/linux/sudo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Running commands as superuser

## Installing

### Debian

apt-get install sudo

## Sudoers Configuration

visudo

Examples:

# User privilege specification
root ALL=(ALL:ALL) ALL

username ALL=(ALL:ALL) NOPASSWD: ALL

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

With this example, root can run all commands in any host and for any user using sudo.

The user 'username' can do the same and doesn't need to type any password for that.

All users in 'sudo' group can run any command as any user after typing their password.

## Usage Example

sudo apt-get update
sudo apt-get upgrade
sudo -u postgres psql -l

0 comments on commit ea0fb0c

Please sign in to comment.