[精讚] [會員登入]
2377

[Centos7] 把帳號新增移除具有root權限等級的sudoer

把帳號新增或移除具有root權限等級的sudoer

分享此文連結 //n.sfs.tw/11846

分享連結 [Centos7] 把帳號新增移除具有root權限等級的sudoer @新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2019-10-25 13:40:22 最後編修
2017-09-27 10:47:42 By 張○○
 

自動目錄

superuser 就是sudoer,可以執行具有root權限的操作

利用root權限執行

新增

# usermod -aG wheel username

重開機才會生效

移除

[1]教的方法設成空的群組就會變成最原始的群組,外加的都不見

# usermod -aG "" username

查看

查看誰有sudo權限

# lid -g wheel

參考資料

[1] https://unix.stackexchange.com/questions/29570/how-do-i-remove-a-user-from-a-group

[2] https://www.digitalocean.com/community/tutorials/how-to-add-and-delete-users-on-a-centos-7-server

END

你可能感興趣的文章

[Centos7] 新的防火牆firewalld Centos7新的防火牆firewalld 和前面的iptables有很大的不同

[Centos] 安裝及使用postfix,設定虛擬帳號及轉寄 使用postfix來設定虛擬帳號及轉寄

[Rocky9] 安裝docker 安裝docker

SELinux 常用指令和檔案 在Redhat系列中,Centos5以後加入了selinux,他並沒有這麼可怕,不必每次看到Selinux ,就想把他

[CentOS 8] 無法使用: No URLs in mirrorlist error Centos8 沒辦法使用yum安裝軟體的解決方法

[CentOS6] 設定 sendmail Centos6上設定sendmail,基本上sendmail會設定多半是為了寄系統信和收垃圾信(喂!!?)

隨機好文

[jQuery] textarea 的取值和給值 HTML 的 TEXTAREA 標籤若要用 jquery 取值,不能使用 .text() 或 .html() ,使用 .

[jQuery] select 元件的取值及給值 html中的元件select,在jquery中要如何使用?

[Windows7] 移除IE10及移除IE11 Windows7 不得已的情況要移除IE11或IE10怎麼做?

[CodeIgniter3] 解決無法上傳特定檔案(.sb2)的問題 上傳時出現The filetype you are attempting to upload is not allowed,要怎麼解決?

NETCRAFT發現你的網站及作業系統 NETCRAFT可以發現你的網站及作業系統