日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

Linux配置sudo

發布時間:2023/12/4 linux 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux配置sudo 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?檢查是否已經安裝sudo

[root@localhost ~]# ls -l `whereis sudo` ---s--x--x. 2 root root 186800 Sep ?1 ?2010 /usr/bin/sudo -rw-r--r--. 2 root root ?11296 Sep ?1 ?2010 /usr/share/man/man8/sudo.8.gz 若沒安裝,自行下載rpm或者源碼進行安裝 增加配置 允許rhel 不輸入密碼就 sudo到root [root@localhost ~]# grep NOPASSWD /etc/sudoers # %wheel ALL=(ALL) NOPASSWD: ALL rhel ?ALL=(ALL) ? ? ? NOPASSWD: ALL 驗證: [root@localhost ~]# id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [root@localhost ~]# su - rhel [rhel@localhost ~]$ id uid=500(rhel) gid=500(rhel) groups=500(rhel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [rhel@localhost ~]$ sudo -u root -s [root@localhost rhel]# id uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [root@localhost rhel]# sudo -l Matching Defaults entries for root on this host: requiretty, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin User root may run the following commands on this host: (ALL) ALL 初略配置完畢!

轉載于:https://blog.51cto.com/6876163/1167020

總結

以上是生活随笔為你收集整理的Linux配置sudo的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。