[精讚] [會員登入]
2364

[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

你可能感興趣的文章

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

[Centos8] 網頁化的系統管理介面 cockpit Centos8 提供一個網頁化的管理介面,稱為駕駛艙,值得一試

移除ssl 私鑰的密碼 現在用ssl產生私鑰會需要設定密碼,但是私鑰有密碼,啟動apache會失敗。

[Centos8] 利用nmcli 設定ipv4 位址 Centos7之後修改網路設定變得比較麻煩一點,此篇介紹使用nmcli指令的方法

[Centos7] 安裝apache+php7+mariadb10+selinux Centos7 安裝apache+php7+mariadb10+selinux

[Rocky9+Docker] Mariadb Cluster + HAPROXY + Docker compose 把mariadb多個節點放在同一個docker中建立叢集的作法到底可不可行?

隨機好文

Linux shell 的date表示法 linux下SHELL中的date表示法

精讚的版面變化 ▓此文僅作為舊文的記錄▓ 這篇文章為了紀念改版完成而撰寫。 原本的部落格是民國97年的作品,那時還是用舊有的技術來寫,很

[CodeIgniter 3] 資料庫的使用方法整理1/2 --Select的使用 [CodeIgniter 3] 資料庫的使用方法整理:Select的使用

[Wildfly10] 發佈war檔 deploy war file onto wildfly10

[MAC] 安裝APACHE+PHP OS Darwin OpenIDMac1deAir 15.6.0 Darwin Kernel Version 15.6.