[精讚] [會員登入]
2365

[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

你可能感興趣的文章

[Centos] opentftp + selinux 安裝及設定 Centos 安裝微型ftp伺服器:tftp伺服器

[Centos7] 安裝nodejs8+yarn 安裝nodejs 8+ yarn的過程記錄

[Rocky9] Sphinx 3支援中文 + Docker + PHP7 使用docker建置sphinxsearch 3

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

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

[Linux] 安裝rsync (selinux 的設定) 在selinux enforcing 的情況下安裝rsync

隨機好文

[MAC] 截取螢幕畫面的方法 截取螢幕畫面的方法,在MAC中叫作螢幕快照,英文是screenshot

看懂DSUB DVI HDMI USB等各式影音接頭 看懂DSUB DVI HDMI等各式影音接頭

[Win7] 燒錄 iso 檔 在Windows7 中內建燒錄程式,可以直接把檔案拉到光碟機裡,再執行燒錄。

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

APACHE的記錄檔格式 LogFormat 語法 在APACHE中有定義一些記錄的語法模版 在 /etc/httpd/conf/httpd.conf 中: LogForm