[zhangzhipeng@localhost ~]$ sudo su
[sudo] password for zhangzhipeng:
zhangzhipeng is not in the sudoers file.
This incident will be reported.
[zhangzhipeng@localhost ~]$ su
Password:
[root@localhost zhangzhipeng]#
[root@localhost zhangzhipeng]#
vi /etc/sudoers
在sudoers末尾添加一行
zhangzhipeng ALL=(ALL) ALL
:wq! 保存退出
[zhangzhipeng@localhost ~]$ sudo su
[sudo] password for zhangzhipeng:
[root@localhost zhangzhipeng]# exit