我刚刚将 sudo 从 1.81.6 升级到 1.9.5 版本,发现新版本无法与 SSH LDAP 帐户正常配合使用,所以我想使用 apt install 来降级,但是不起作用。
root@sin-rcr01:/home/ubuntu# apt policy sudo
sudo:
Installed: 1.8.16-0ubuntu1.2
Candidate: 1.8.16-0ubuntu1.10
Version table:
1.8.16-0ubuntu1.10 500
500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
*** 1.8.16-0ubuntu1.2 100
100 /var/lib/dpkg/status
1.8.16-0ubuntu1 500
500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
root@sin-rcr01:/home/ubuntu# apt install sudo=1.8.16-0ubuntu1.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
sudo is already the newest version (1.8.16-0ubuntu1.2).
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-45 linux-headers-4.4.0-45-generic linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-66 linux-headers-4.4.0-66-generic linux-headers-4.4.0-70
linux-headers-4.4.0-70-generic linux-headers-4.4.0-71 linux-headers-4.4.0-71-generic linux-headers-4.4.0-72 linux-headers-4.4.0-72-generic linux-image-4.4.0-45-generic
linux-image-4.4.0-64-generic linux-image-4.4.0-66-generic linux-image-4.4.0-70-generic linux-image-4.4.0-71-generic linux-image-4.4.0-72-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 375 not upgraded.
我也下载了 sudo 1.8.5 包并安装,但它只会损坏 sudo 包,我无法再运行 sudo,必须恢复服务器。请告诉我如何降级 sudo 包,我使用的是 Ubuntu 16.04。谢谢。
我从源代码安装了 sudo 1.9.5:
wget https://www.sudo.ws/dist/sudo.tar.gz && \
tar xvzf sudo.tar.gz && \
cd sudo-1.9.5p2/ && \
./configure && \
make && \
make install
ubuntu@sin-rcr01:~$ sudo -V
Sudo version 1.9.5p2
Sudoers policy plugin version 1.9.5p2
Sudoers file grammar version 48
Sudoers I/O plugin version 1.9.5p2
Sudoers audit plugin version 1.9.5p2