Hello,
Below here have explained the sudo issue which is occurred in CentOS 7
Problem
sudo fails when the password has expired in centOS 7
Steps to Reproduce
1.expire users password
2.attempt to use sudo
E.g.
sudo echo "test" > file.txt
/usr/bin/chage -d0 root
sudo echo "test" > file1.txt
Error:
sudo: Account or password is expired, reset your password and try again
sudo: no tty present and no askpass program specified
sudo: unable to change expired password: Authentication token manipulation error
These steps are working perfectly in CentOS 6, but not it CentOS7
Redhat Bugzilla Response
Found the same kind of bug report in Bugzilla, https://bugzilla.redhat.com/show_bug.cgi?id=1713448
Here they commented as it was fixed and released patches, but it is not working in the latest CentOS 7. sudo-1.8.23-4.el7_7.2.x86_64.rpm is used in the latest centOS 7.
In addition that tried with given workaround solution as Add the following line to /etc/sudoers: Defaults !pam_session, but it also not working.
Looking solution to resolve the issue.
Thanks in advance.
Regards
Dinesh
sudo fails if password expired at CentOS 7
-
- Posts: 2
- Joined: 2020/04/22 06:37:19
Re: sudo fails if password expired at CentOS 7
Update to the copy of sudo in the CR repo using yum --enablerepo=cr update sudo
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 2
- Joined: 2020/04/22 06:37:19
Re: sudo fails if password expired at CentOS 7
Thanks for your quick response.
After executing the given command, sudo rpm is upgraded from sudo-1.8.23-4.el7_7.2.x86_64 to sudo-1.8.23-9.el7.x86_64
but still facing the same issue, kindly provide the alternate solution to resolve.
Regards
Dinesh
After executing the given command, sudo rpm is upgraded from sudo-1.8.23-4.el7_7.2.x86_64 to sudo-1.8.23-9.el7.x86_64
but still facing the same issue, kindly provide the alternate solution to resolve.
Regards
Dinesh
Re: sudo fails if password expired at CentOS 7
Frankly that's reasonable (and sudo is a part of the PAM stack).sudo fails when the password has expired in centOS 7