[精讚] [會員登入]
2425

[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

你可能感興趣的文章

[Centos6] 安裝wordpress Centos 6下安裝wordpress,非常簡單

[CENTOS7] 使用 logrotate 來整理mongo日誌檔 解決 mongo 的日誌檔不斷長大的問題

[Centos7] SSL自簽憑證+APACHE+Selinux SSL的自簽憑證

[CentOS] 改錯fstab 無法開機怎麼辦? Linux 改錯fstab 無法開機怎麼辦?

[Rocky Linux9] 安裝docker+ docker compose+ apache+ maraidb+ php7 Rocky Linux(Centos9) 下安裝docker及docker compose

TFTP Server 安裝及使用 讓設備的網路設定檔或是韌體經由TFTP拷備出來,操作的方法

隨機好文

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

[bc] linux 的計算機 bc 設定小數位數、計算π、次方根 linux 的計算機 bc 設定小數位數、計算π、次方根

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

UTF-8的網頁但IE8一片空白 UTF8編碼的網頁在Firefox 正常顯示、但IE8 就是空白,IE8編碼設定是「自動偵測」可是自動偵測到的是 big5...

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