Sudo ja sudoers: Difference between revisions
From ICO wiki
Jump to navigationJump to search
Line 52: | Line 52: | ||
# Members of the admin group may gain root privileges | # Members of the admin group may gain root privileges | ||
%admin ALL=(ALL) ALL | %admin ALL=(ALL) ALL | ||
User_Alias OPERATORS = Joe, Mike, jude | |||
Runas_Alias OP = root, operator Runas_Alias OP = root, operator | |||
Host_Alias OFNET = 10.1.2.0/255.255.255.0 Host_Alias OFNET = 10.1.2.0/255.255.255.0 | |||
Cmnd_Alias PRINTING = /usr/sbin/lpc, /usr/bin/lprm Cmnd_Alias PRINTING = / usr / sbin / LPC, / usr / bin / lprm | |||
== Spikker == | == Spikker == |
Revision as of 20:27, 26 April 2010
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
Sudoers fail koosneb kahte tüüpi kirjetest: aliased (põhiliselt muutujad) ja kasutaja kirjeldused (kes võib mida käivitada).
Vaikimisi sudoers 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
User_Alias OPERATORS = Joe, Mike, jude Runas_Alias OP = root, operator Runas_Alias OP = root, operator Host_Alias OFNET = 10.1.2.0/255.255.255.0 Host_Alias OFNET = 10.1.2.0/255.255.255.0 Cmnd_Alias PRINTING = /usr/sbin/lpc, /usr/bin/lprm Cmnd_Alias PRINTING = / usr / sbin / LPC, / usr / bin / lprm
Spikker
Alati on abiks man käsk
man sudo
Kasutatud materjal
http://manpages.ubuntu.com/manpages/karmic/man8/sudo.8.html