CentOS7 'Username' is not in the sudoers file. This incident will be reported

新裝的 CentOS 須要安裝許多軟件,可是若是一開始你不是以 root 登入的話,就須要使用 sudo 進行切換,可是一般會報錯以下圖:code

 

 

解決方法:

先用 root 用戶登入系統,blog

打開文件軟件

vi /etc/sudoers

將用戶名稱添加到文件中
user_name ALL=(ALL)  ALL
相關文章
相關標籤/搜索