Bug 1050 - `sudo su - <user>` does not allow assumption of another user, yields exit code 137
`sudo su - <user>` does not allow assumption of another user, yields exit cod...
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.9.13
Other Linux
: normal high
Assigned To: Todd C. Miller
: 1051 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-05-24 18:13 MDT by manickam
Modified: 2023-06-27 17:27 MDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description manickam 2023-05-24 18:13:47 MDT
```
[user@ip-x-x-x-x ~]$ sudo su - ec2-user
Last login: Thu May 25 00:09:11 UTC 2023 on pts/0
sudo: argv[0] mismatch, expected "/bin/bash", got "-bash"
Killed
```

```
[user@ip-x-x-x-x ~]$ sudo --version
Sudo version 1.9.13p3
Sudoers policy plugin version 1.9.13p3
Sudoers file grammar version 50
Sudoers I/O plugin version 1.9.13p3
Sudoers audit plugin version 1.9.13p3
```

Running `sudo su - <user>` results in the above error. I have included information about our version of the sudo package

We downgraded to v1.9.11p3, where using `sudo su - <user>` seems to work again, however, this version is not acceptable to us

Please let me know if there is any other information I can provide
Comment 1 manickam 2023-05-24 18:25:15 MDT
This is on a RHEL8 machine:

NAME="Red Hat Enterprise Linux"
VERSION="8.8 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.8 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"
Comment 2 Todd C. Miller 2023-05-24 18:47:54 MDT
You can work around this by disabling intercept_verify.  For example:

Defaults !intercept_verify
Comment 3 Todd C. Miller 2023-06-07 11:21:24 MDT
*** Bug 1051 has been marked as a duplicate of this bug. ***
Comment 4 Todd C. Miller 2023-06-27 17:27:03 MDT
Fixed in sudo 1.9.14.