Bugzilla – Bug 858
sudo -p '' issues a password prompt when it should not
Last modified: 2018-10-26 11:50:44 MDT
I have small script that invokes another shell script as root thus: #!/bin/bash echo "mypass" | sudo -p '' -S /usr/StorMan/StorMan.sh when running under Ubuntu 16.04 LTS (sudo 1.8.16 I think)this didn't display a password prompt which I understand to be correct behaviour. Since upgrading to Ubuntu 18.04.1 LTS the output looks like: amonra@Charon:~$ ./storman [sudo] password for amonra: which as far as I can determine is not correct. I originally reported this here: https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/1799857 but the Ubuntu team have found that the sudo binary in question actually works correctly on earlier releases on Ubuntu so this may not be related to changes between 1.8.16 and 1.8.21 but something more complex - either way that have decided not to investigate further. I tried to work out from the source how this problem might happen, but failed :(. Thanks Dave ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: sudo 1.8.21p2-3ubuntu1 ProcVersionSignature: Ubuntu 4.15.0-38.41-generic 4.15.18 Uname: Linux 4.15.0-38-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.4 Architecture: amd64 CurrentDesktop: LXDE Date: Thu Oct 25 03:07:27 2018 InstallationDate: Installed on 2016-03-28 (940 days ago) InstallationMedia: Ubuntu-Server 14.04.4 LTS "Trusty Tahr" - Release amd64 (20160217.1) SourcePackage: sudo UpgradeStatus: Upgraded to bionic on 2018-10-22 (2 days ago) VisudoCheck: /etc/sudoers: parsed OK /etc/sudoers.d/README: parsed OK
This was fixed in sudo 1.8.22 by the following commit: https://www.sudo.ws/repos/sudo/rev/93cc4f4761f3