sudo使用
sudo使用
/etc/sudo.conf
/etc/sudoers
/etc/sudoers.d/
/etc/sudo-ldap.conf
/etc/sudoer sudo安全策略配置文件
Defaults requiretty Defaults !visiblepw Defaults always_set_home Defaults env_reset Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS" Defaults env_keep += "MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE" Defaults env_keep += "LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES" Defaults env_keep += "LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE" Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY" Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin root ALL=(ALL) ALL #includedir /etc/sudoers.d環(huán)境變量
requiretty # 登錄用戶允許運(yùn)行sudo always_set_home visiblepw # sudo拒絕未通過密碼驗(yàn)證的用戶后,是否顯示信息別名
# User alias specificationUser_Alias FULLTIMERS = millert, mikef, dowdyUser_Alias PARTTIMERS = bostley, jwfox, crawlUser_Alias WEBMASTERS = will, wendy, wim # Runas alias specificationRunas_Alias OP = root, operatorRunas_Alias DB = oracle, sybaseRunas_Alias ADMINGRP = adm, oper # Host alias specificationHost_Alias SPARC = bigtime, eclipse, moet, anchor :\SGI = grolsch, dandelion, black :\ALPHA = widget, thalamus, foobar :\HPPA = boa, nag, pythonHost_Alias CUNETS = 128.138.0.0/255.255.0.0Host_Alias CSNETS = 128.138.243.0, 128.138.204.0/24, 128.138.242.0Host_Alias SERVERS = master, mail, www, nsHost_Alias CDROM = orion, perseus, hercules # Cmnd alias specificationCmnd_Alias DUMPS = /usr/bin/mt, /usr/sbin/dump, /usr/sbin/rdump,\/usr/sbin/restore, /usr/sbin/rrestoreCmnd_Alias KILL = /usr/bin/killCmnd_Alias PRINTING = /usr/sbin/lpc, /usr/bin/lprmCmnd_Alias SHUTDOWN = /usr/sbin/shutdownCmnd_Alias HALT = /usr/sbin/haltCmnd_Alias REBOOT = /usr/sbin/rebootCmnd_Alias SHELLS = /usr/bin/sh, /usr/bin/csh, /usr/bin/ksh,\/usr/local/bin/tcsh, /usr/bin/rsh,\/usr/local/bin/zshCmnd_Alias SU = /usr/bin/suCmnd_Alias PAGERS = /usr/bin/more, /usr/bin/pg, /usr/bin/less訪問控制
# User specification, format: User Host = (RunAs) Commandroot ALL = (ALL) ALL%wheel ALL = (ALL) ALL # root用戶,wheel組成員允許以任意用戶身份在任意主機(jī)執(zhí)行任意命令FULLTIMERS ALL = NOPASSWD: ALL # FULLTIMERS用戶別名的成員允許在任意主機(jī)執(zhí)行任意命令,無須密碼認(rèn)證PARTTIMERS ALL = ALL # PARTTIMERS用戶別名的成員允許在任意主機(jī)執(zhí)行任意命令,首次需要密碼認(rèn)證bob SPARC = (OP) ALL : SGI = (OP) ALL # ':' 分隔2類主機(jī)fred ALL = (DB) NOPASSWD: ALLWEBMASTERS www = (www) ALL, (root) /usr/bin/su www # ',' 分隔2類用戶身份operator ALL = DUMPS, KILL, SHUTDOWN, HALT, REBOOT, PRINTING, sudoedit /etc/printcap, /usr/oper/bin/ posted on 2014-11-19 10:12 北京濤子 閱讀(...) 評(píng)論(...) 編輯 收藏轉(zhuǎn)載于:https://www.cnblogs.com/liujitao79/p/4107564.html
總結(jié)
- 上一篇: 汉堡包~~~
- 下一篇: 有关启动图片Launch的设置