Sudo ja sudoers

From ICO wiki
Revision as of 20:15, 26 April 2010 by Rruul (talk | contribs)
Jump to navigationJump to search

Juurkasutajaks autentimiseks kasutatakse käsk sudo. Sudoers on sudo konfiguratsiooni fail.

Autor

POOLELI!!!

Riti Ruul AK32

Sudo

Käivita käsk teise kasutajana. Võimaldab lubada kasutajal käsu administraatorina või teise kasutaja, nagu on täpsustatud sudoers faili.

Süntaks

      sudo [ -H ] [-P ] [-S ] [ -b ] command sudo [-H] [-P] [-S] [-b] käsuga
      sudo [ -p prompt ] [ -c class |- ] sudo [-p kiiret] [-c klassi | -]
              [ -a auth_type ] [ -u username |# uid ] command [-Auth_type] [-u kasutajanimi | # uid] käsuga
      sudo -V | -h | -l | -L | -v | -k | -K | -s command sudo-V |-h |-l |-L |-v |-k |-K |-s käsk


Sudoers

Et konfigureerida sudo konfiguratsiooni faili (.../etc/sudoers) on meil vaja programmi visudo.

visudo


Vaikimisi sudoer fail

# /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    env_reset

# 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

Spikker

Alati on abiks man käsk

man sudo


Kasutatud materjal

http://manpages.ubuntu.com/manpages/karmic/man8/sudo.8.html

https://help.ubuntu.com/community/Sudoers

http://www.gratisoft.us/sudo/intro.html