<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>281802</bug_id>
          
          <creation_ts>2011-09-11 13:27:37 +0000</creation_ts>
          <short_desc>KCheckpass doesn&apos;t work correctly with samba accounts</short_desc>
          <delta_ts>2022-11-03 16:07:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kscreenlocker</product>
          <component>kcheckpass</component>
          <version>unspecified</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>UNMAINTAINED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Christian Nitschkowski">cn001</reporter>
          <assigned_to name="Plasma Bugs List">plasma-bugs-null</assigned_to>
          <cc>bshah</cc>
    
    <cc>luigiwalser</cc>
    
    <cc>mgraesslin</cc>
    
    <cc>nate</cc>
    
    <cc>null</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1161726</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Nitschkowski">cn001</who>
    <bug_when>2011-09-11 13:27:37 +0000</bug_when>
    <thetext>Version:           4.6
OS:                Linux

I can log into a session with a samba user account using kdm, but when I lock the screen, I can&apos;t unlock it anymore.
I tried to execute kcheckpass in a terminal and monitor the syslog files.
When I enter an incorrect password, kcheckpass will tell me

Error: Wrong Password
Authentication failure

The log tells me that the password is wrong, too:

Sep 11 15:15:12 pccn01 kcheckpass[8059]: pam_winbind(xdm:auth): request wbcLogonUser failed: WBC_ERR_AUTH_ERROR, PAM error: PAM_AUTH_ERR (7), NTSTATUS: NT_STATUS_WRONG_PASSWORD, Error message was: Wrong Password

So far this works as expected, but now here comes the problem:
When I try to enter the correct password, kcheckpass tells me &quot;Authentication failure&quot; and returns a value of 1 which means &quot;incorrect password&quot;.
But the log now tells me
Sep 11 15:21:50 pccn01 kcheckpass[8269]: pam_winbind(xdm:auth): user &apos;NITSCHKOWSKI\christian&apos; granted access
Sep 11 15:21:50 pccn01 kcheckpass[8269]: Authentication failure for christian@NITSCHKOWSKI (invoked by uid 0)

I can log on using kdm and the plain shell login, just kcheckpass doesn&apos;t work.

The permissions on kcheckpass are 4755 root shadow.

Reproducible: Always

Steps to Reproduce:
1. Call kcheckpass -U user@domain
2. Enter correct Password of the provided user.

Actual Results:  
The syslog contains a line stating the login was successfull and another line stating the authentication failed.
The kcheckpass utility returns a value of 1, stating the password was incorrect.

Expected Results:  
The syslog should contain a line stating the login was successfull and the kcheckpass utility should return the value 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1501541</commentid>
    <comment_count>1</comment_count>
    <who name="Christian Nitschkowski">cn001</who>
    <bug_when>2015-02-22 10:22:54 +0000</bug_when>
    <thetext>The problem still exists on Plasma 5.2.
I don&apos;t know how it is implemented now, as kcheckpass seems to be no more.
Anyway, after the screen was locked in a session started by a user that is authenticated using a Samba PDC, the screen won&apos;t unlock as the password isn&apos;t recognized as valid.
I&apos;ll try to provide logs with the new version of Plasma.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563780</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Flöser">mgraesslin</who>
    <bug_when>2015-12-15 16:46:37 +0000</bug_when>
    <thetext>kcheckpass is still used in Plasma 5. Can you please try running kcheckpass from a console? It&apos;s in /usr/lib/&lt;arch&gt;/libexec/kf5/kcheckpass

we probably need quite some help here as we devs don&apos;t have a setup with authentication shrough samba.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1612987</commentid>
    <comment_count>3</comment_count>
    <who name="David Walser">luigiwalser</who>
    <bug_when>2016-08-09 19:37:16 +0000</bug_when>
    <thetext>This appears to be a problem with using non-local users in general.  However, KDE4 (Mageia 5) worked fine.  It&apos;s not until Plasma 5 (5.7.2 being the first version I tested) where the issue shows up (Mageia Cauldron).

I confirmed that running kcheckpass in the Konsole also gives Authentication failure when entering the correct password.  For a local user, it works just fine.  I have reported this also here:
https://bugs.mageia.org/show_bug.cgi?id=19103

/etc/pam.d/kcheckpass just includes system-auth for all 4 sections.  My non-local users are using sssd (the accounts are in Active Directory).

/etc/pam.d/system-auth has this:
auth        required      pam_env.so
auth        required      pam_mount.so
auth        sufficient    pam_tcb.so shadow nullok prefix=$2a$ count=8 use_first_pass
auth        sufficient    pam_sss.so use_first_pass
auth        required      pam_deny.so

account     sufficient    pam_tcb.so shadow
account     [default=bad success=ok user_unknown=ignore] pam_sss.so
account     required      pam_permit.so

password    required      pam_cracklib.so try_first_pass retry=3 minlen=4  dcredit=0  ucredit=0
password    sufficient    pam_tcb.so use_authtok shadow write_to=shadow nullok prefix=$2a$ count=8
password    sufficient    pam_sss.so use_authtok
password    required      pam_deny.so

session     required      pam_mkhomedir.so umask=0026 skel=/etc/skel/ silent
session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
-session    optional      pam_systemd.so
session     required      pam_tcb.so
session     optional      pam_sss.so
session     optional      pam_mount.so disable_interactive</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1613020</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Flöser">mgraesslin</who>
    <bug_when>2016-08-10 05:16:05 +0000</bug_when>
    <thetext>&gt; /etc/pam.d/kcheckpass just includes system-auth for all 4 sections. 

This file is not provided by us. Seems mageia adds it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1613077</commentid>
    <comment_count>5</comment_count>
    <who name="David Walser">luigiwalser</who>
    <bug_when>2016-08-10 11:15:34 +0000</bug_when>
    <thetext>(In reply to Martin Gräßlin from comment #4)
&gt; &gt; /etc/pam.d/kcheckpass just includes system-auth for all 4 sections. 
&gt; 
&gt; This file is not provided by us. Seems mageia adds it?

Yes, as has always been the case.  It wasn&apos;t until Plasma 5 that this issue appeared.  Is there some modification to the PAM configuration that you would suggest?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1613093</commentid>
    <comment_count>6</comment_count>
    <who name="Martin Flöser">mgraesslin</who>
    <bug_when>2016-08-10 12:36:56 +0000</bug_when>
    <thetext>&gt; Is there some modification to the PAM configuration that you would suggest?

Sorry, I&apos;m not familiar enough with PAM and especially AD authentication to suggest something. All I know is that kcheckpass auth code did not see any changes in years.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2168473</commentid>
    <comment_count>7</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2022-11-03 16:07:03 +0000</bug_when>
    <thetext>kcheckpass support has been removed for a couple releases now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>