[精讚] [會員登入]
2346

[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

你可能感興趣的文章

使用dnstop 來觀察dns運作的情形 dnstop是非常方便的工具,可以觀察即時的dns查詢。 安裝 yum install dnstop

[CENTOS8] Failed to download metadata for repo 'appstream' 的問題 Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist的解決方法。

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

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

[Centos7] 安裝php套件管理程式Composer+ Codeignioter3 很多人在用的套件管理程式 Composer+ Codeignioter3+ 指定安裝目錄

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

隨機好文

使用Google尋找你的手機 這近發現google竟然可以用來找android的手機,而且不需要經過什麼設定或安裝軟體。

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

設計的工作絕不接受比價 拿買陽春麵的價格想買牛肉麵,寧願倒掉也不賣

正則表達式:Email名稱防止連續輸入點(.)及下底線(_) Email的名稱中要允許特殊符號,但又不允許連續出現的正則表達式

[大型機台] 熱血高校躲避球 多少少年時光歲月耗在這個遊戲上,二十幾年前的那個時光,唯一想做的事就是把吃飯錢省下來拿去打一場五塊錢的電動,就算是沒錢也