新装的 CentOS 需要安装许多软件,但是如果一开始你不是以 root 登入的话,就需要使用 sudo 进行切换,但是通常会报错如下图:

 

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

 

解决方法:

先用 root 用户登入系统,

打开文件

vi /etc/sudoers

将用户名称添加到文件中
user_name ALL=(ALL)  ALL
 
 

 

相关文章:

  • 2021-05-18
  • 2021-05-26
  • 2022-03-07
  • 2022-03-06
  • 2022-02-20
  • 2021-12-18
  • 2021-10-18
  • 2021-12-12
猜你喜欢
  • 2021-07-08
  • 2022-01-02
  • 2021-07-15
  • 2021-12-03
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案