Bug 1332401

Summary: RFE: sudo with sssd/ldap doesn't work with 'insults' in sudoOption entry
Product: Red Hat Enterprise Linux 7 Reporter: Steven Haigh <netwiz>
Component: sudoAssignee: Daniel Kopeček <dkopecek>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 7.4CC: dkopecek, dspurek, ebenes, netwiz, pkis, qe-baseos-security, rsroka, tosykora
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1138758 Environment:
Last Closed: 2017-02-28 09:12:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Steven Haigh 2016-05-03 06:40:12 UTC
RFE: Compile in insults, or if supported, as an optional subpackage for sudo.

Don't make me insult anyone for refusing this ;)

Optional stretch target:
* List the insults subpackage as a dependency on *-release

+++ This bug was initially created as a clone of Bug #1138758 +++

Description of problem:
sudo with sssd/ldap doesn't work with 'insults' in sudoOption entry.

dn: cn=defaults,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
sudoOption: !requiretty
sudoOption: authenticate
sudoOption: insults
cn: defaults

dn: cn=rule1,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
cn: rule1
sudoUser: userallowed
sudoCommand: ALL
sudoHost: ALL
sudoHost: test.example.com

[test]su - userallowed
Last login: Fri Sep  5 10:44:49 EDT 2014 on pts/0
su: warning: cannot change directory to /home/userallowed: No such file or directory
-bash-4.2$ sudo true
[sudo] password for userallowed: 
Sorry, try again.


Should should print some 'insults' instead of 'Sorry, try again.' Some examples are here: http://www.cnx-software.com/2012/06/05/how-to-let-sudo-insult-you-when-you-type-the-wrong-password/

This option looks like 'for fun' for me but we have this option in man page and it should work.

Version-Release number of selected component (if applicable):
sudo-1.8.6p7-11.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Daniel Kopeček on 2015-02-25 01:12:17 EST ---

This is because we don't configure sudo to include insults at compile time:

configure:4994: checking whether to include insults
configure:5021: result: no

This is fixable by using --with-insults=yes. Do we really need this? I don't think so, since there's no customer case attached to this BZ... If there will be demand for this feature, we can easily fix it. Closing for now.

--- Additional comment from David Spurek on 2015-02-25 01:16:51 EST ---

Ok, so what about remove this option from man page?

--- Additional comment from Daniel Kopeček on 2015-02-25 01:24:34 EST ---

Probably not worth the effort, there are more serious bugs to work on. The option is there and it's accepted by sudo, there are just no insults in the database. Maybe some of our customers will read the man page, see the option there, and file a BZ demanding some insults to be included... If we hide it, they may never discover this cool option.

But if you insist, I'll fix it either way :]

Comment 2 Steven Haigh 2016-05-03 10:54:49 UTC
I was discussing this bug report on IRC with other users. I feel the customer use case is very much pointed out by this usage:

< theraspberry_> CRCinAU: I have that change on all my machines
< theraspberry_> sudo insults keep me from being lonely
< theraspberry_> sometimes i'll just open up a terminal and type sudo echo just to type my password wrong

I would like to believe that RedHat cares for the (in)sanity of the system administration world and allow us to feel the warm burn of a failed sudo attempt to bring joy to our world.

Comment 3 Daniel Kopeček 2017-02-28 09:12:48 UTC
Closing. Sudo will stay well-mannered in RHEL.