虚拟机输入su出现以下错误
[lcm@localhost ~]$ su
Password:
su: Authentication failure
执行sudo root
[lcm@localhost ~]$ sudo root
[sudo] password for lcm:
lcm is not in the sudoers file. This incident will be reported.
所以需要添加root账户
快捷键command+L,或者重启虚拟机,登陆页面选择log in as another user按键
创建root,密码root,成功后
再切回原账户,command+L,或者重启虚拟机,
成功!