čtvrtek 27. prosince 2007

Debian a sudo

Nainstalujeme potřebný balíček:
# apt-get install sudo


Upravíme soubor /etc/sudoers:
# vim /etc/sudoers

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
# Defaults

Defaults !lecture,tty_tickets,!fqdn

# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL


Vytvoříme skupinu admin, kde jednotliví členové budou mít práva uživatele root:
# groupadd admin


Přidání existujícího uživatele do skupiny admin:
# usermod -a -G admin orkac


Případně ještě můžete zakázat root heslo:
$ sudo passwd -l root

Žádné komentáře: