1查看sudo版本
sudo --version
2.下载sudo最新安装文件
sudo官方地址https://www.sudo.ws/
3.解压
tar -zxvf sudo-1.9.2.tar.gz
4
cd sudo-1.9.2
./configure --prefix=/usr --libexecdir=/usr/lib --with-secure-path --with-all-insults --with-env-editor --docdir=/usr/share/doc/sudo-1.9.2 --with-passprompt="[sudo] password for %p: "
如果没有安装gcc会出现下面错误configure: error: no acceptable C compiler found in $PATH
需要安装gcc
yum install gcc
5
make
6
make install && ln -sfv libsudo_util.so.0.0.0 /usr/lib/sudo/libsudo_util.so.0
7
visudo
#在root ALL=(ALL) ALL
#下面添加 <newuser> ALL=(ALL)ALL
8查看sudo版本