Bug 1419028 - sudo is unable to verify my password using krb5 / kerberos
Summary: sudo is unable to verify my password using krb5 / kerberos
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: sudo
Version: 27
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Daniel Kopeček
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-03 13:18 UTC by Nathan Lannine
Modified: 2018-11-30 19:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-30 19:25:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nathan Lannine 2017-02-03 13:18:41 UTC
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Build Identifier: 

With Fedora 24, I configured kerberos authentication using authconfig-tui, and added a local user with the same username as my centralized account, which allowed me to login via ssh and gdm and allowed me to use sudo with my centrally managed account password.

Upon upgrade to Fedora 25, I was no longer able to login using centralized credentials via kerberos.  Upon explicitly installing krb5-workstation and again running authconfig-tui, I was again able to login via ssh using my centralized account credentials.  However, I am now no longer able to use sudo with my centralized credentials unless I add the "NOPASSWD:" flag to my user or group entry in the sudoers file.  Any attempt to use sudo without the NOPASSWD flag or "su" to login to a centralized account fails with an authentication failed error.

Reproducible: Always

Steps to Reproduce:
1. Install krb5-workstation.
2. Run authconfig-tui to configure kerberos authentication with a local user database.
3. Create a local account with a username that matches a centralized account managed by the KDC/realm.
4. Add the local account name to the sudoers file with an entry like, "<username> ALL=(ALL) ALL" or add the user to the "wheel" group.
5. Enable sshd and configure sshd with "KerberosAuthentication yes".
6. Login via ssh with the newly configured user using the centrally managed password.
7. Run "sudo ls" as the newly configured user.
(I think that covers it).
Actual Results:  
[<username>@nl-f19-kenn101 ~]$ sudo ls
[sudo] password for <username>:
Sorry, try again.
[sudo] password for <username>:
Sorry, try again.
[sudo] password for <username>:
sudo: 3 incorrect password attempts


Expected Results:  
[sudo] password for <username>:
<file list output>


Doing "journalctl -f" as root when attempting to execute sudo with a centralized user account yields the following output.

//

Feb 03 08:13:46 nl-f19-kenn101.uncc.edu unix_chkpwd[13742]: password check failed for user (<username>)
Feb 03 08:13:46 nl-f19-kenn101.uncc.edu audit[13740]: USER_AUTH pid=13740 uid=1001 auid=1001 ses=12 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=? acct="<username>" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=failed'
Feb 03 08:13:46 nl-f19-kenn101.uncc.edu sudo[13740]: pam_unix(sudo:auth): authentication failure; logname=<username> uid=1001 euid=0 tty=/dev/pts/1 ruser=<username> rhost=  user=<username>
Feb 03 08:13:53 nl-f19-kenn101.uncc.edu unix_chkpwd[13748]: password check failed for user (<username>)
Feb 03 08:13:53 nl-f19-kenn101.uncc.edu audit[13740]: USER_AUTH pid=13740 uid=1001 auid=1001 ses=12 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=? acct="<username>" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=failed'
Feb 03 08:13:59 nl-f19-kenn101.uncc.edu unix_chkpwd[13750]: password check failed for user (<username>)
Feb 03 08:13:59 nl-f19-kenn101.uncc.edu audit[13740]: USER_AUTH pid=13740 uid=1001 auid=1001 ses=12 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=? acct="<username>" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/1 res=failed'
Feb 03 08:14:01 nl-f19-kenn101.uncc.edu audit[13740]: USER_CMD pid=13740 uid=1001 auid=1001 ses=12 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/<username>" cmd="ls" terminal=pts/1 res=failed'
Feb 03 08:14:01 nl-f19-kenn101.uncc.edu sudo[13740]: <username> : 3 incorrect password attempts ; TTY=pts/1 ; PWD=/home/<username> ; USER=root ; COMMAND=/bin/ls

//

This may be related to bug ID 1382430, but I really don't know enough about how Kerberos works to be sure.  I feel like the issue is not really a ticket granting issue.  My KDC is a Microsoft ADC.  It seems like a bug though simply because it worked previously with the exact same setup.

Comment 1 Fedora End Of Life 2017-11-16 18:58:23 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Ben Cotton 2018-11-27 17:17:13 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Ben Cotton 2018-11-30 19:25:25 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.