1.切换成root权限

su root

2.查看/etc/sudoers文件权限,如果只读权限,修改为可写权限

ls -l /etc/sudoers

3.如果是只读进行如下操作

chmod 777 /etc/sudoers

4.添加要提升权限的用户;在文件中找到root ALL=(ALL) ALL,在该行下添加提升权限的用户信息,如:

root    ALL=(ALL)       ALL
user    ALL=(ALL)       ALL

5.保存退出,并恢复/etc/sudoers的访问权限为440

chmod 440 /etc/sudoers

 

相关文章:

  • 2021-12-20
  • 2021-08-06
  • 2021-06-08
  • 2021-06-29
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-24
  • 2021-06-14
  • 2021-12-16
  • 2021-08-03
  • 2022-12-23
  • 2021-10-18
相关资源
相似解决方案