騰訊雲centos7.3記錄

一、修改主機名:linux

hostnamectl set-hostname bradvim

二、新增用戶,設置用戶登陸密碼bash

adduser brad

passwd

三、受權:spa

chmod -v u+w /etc/sudoers

添加內容了,在下面的一行下追加新增的用戶:code

[root@localhost ~]# vim /etc/sudoers
## Allow root to run any commands anywher  
root    ALL=(ALL)       ALL  
linuxidc  ALL=(ALL)       ALL  #這個是新增的用戶

wq保存退出,這時候要記得將寫權限收回:blog

[root@localhost ~]# chmod -v u-w /etc/sudoers
相關文章
相關標籤/搜索