今天在ubuntu8.10遇到一个问题,终端输入sudo -i,有如下输出:
xxx@xxx-desktop:~$ sudo -i[sudo] password for xxx:xxx is not in the sudoers file. This incident will be reported.当使用 “su -“进行切换时又出现su: Authentication failure错误xxx@xxx-desktop:~$ su -Password:su: Authentication failurexxx@xxx-desktop:~$请教各位如何解决这个问题,先谢谢了
解决方法:
默认只有安装时设置的用户才有sudo权力。
新建的用户没有。如果不小心把安装时设置的用户删了,可以到恢复模式中使用root来添加你要的用户sudo权力,用visudo。如果你没有删掉你在安装时设置的用户,可以su THAT_USER,变成那个用户,然后用它来添加当前用户的sudo权力。添加sudo权力的方法:加入admin组。