当sudo执行命令的时候 报“xxx is not in the sudoers file”,意思是当前用户没有sudo权限,解决办法很简单
切换到root用户,然后visudo,把xxx用户加进去
1. su root
2. visudo
增加
## Allow xxx to run any commands anywhere
xxx ALL=(ALL) ALL
visudo 然后查找 ALL,可以找到
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
按照格式把xxx加进去就可以了。
---
加进去之后,记得su xxx切换回用户