Bug 869273 - authconfig --enablewinbindauth does not add pam_winbind.so session entry
authconfig --enablewinbindauth does not add pam_winbind.so session entry
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: authconfig (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 09:02 EDT by Marko Myllynen
Modified: 2013-09-12 06:37 EDT (History)
4 users (show)

See Also:
Fixed In Version: authconfig-6.2.5-1.fc18.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-12 05:16:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Marko Myllynen 2012-10-23 09:02:57 EDT
Description of problem:
When running authconfig --enablewinbind --enablewinbindauth --update all the configuration files are properly updated but "session optional pam_winbind.so" entry is missing, this is contrary to what happens e.g. with --enablesssdauth/pam_sss.so.
Comment 1 Tomas Mraz 2012-11-02 09:06:19 EDT
What does the pam_winbind module do in the session phase? I suppose the session phase was originally missing and that was the reason to not add it there. But if it supports the session phase we can certainly add it.
Comment 2 Guenther Deschner 2012-11-19 06:17:25 EST
Currently, the automatic homedirectory creation (if enabled, see man pam_winbind) of remote accounts is dealt with in the the pam_winbind (optional) session block. Not sure how automatic homedirectory creation for AD accounts is dealt with in general in authconfig.
Comment 3 David Woodhouse 2013-09-12 04:50:23 EDT
Looks like you added it, but it doesn't get *invoked* for me. In further answer to your question about what it does: it also returns PAM_NEW_AUTHTOK_REQD when appropriate, and triggers a password change.

In Fedora 19 my {password,system}-auth PAM config files look like this:

account     required	  pam_unix.so broken_shadow
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     [default=bad success=ok user_unknown=ignore] pam_winbind.so cached_login
account     required	  pam_permit.so

I assume pam_localuser.so is succeeding in my case. I am not using the NSS provisions of winbind since they're too slow; it's only being used for *authentication*.
Comment 4 Tomas Mraz 2013-09-12 05:16:01 EDT
You must use --disablelocauthorize then.
Comment 5 David Woodhouse 2013-09-12 05:39:46 EDT
Thanks. That *kind* of works. I had enabled sssd auth too, just to compare and see if it suffered the same problem. Now I add --disablelocauthorize and can't log in any more. My account stack looks like this:
account     required      pam_unix.so broken_shadow
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     [default=bad success=ok user_unknown=ignore] pam_sss.so
account     [default=bad success=ok user_unknown=ignore] pam_winbind.so cached_login
account     required      pam_permit.so

Since SSSD is not configured, I'd expect a 'user_unknown' response and for things to work properly? But I actually get:

Sep 12 10:38:02 dwoodhou-mobl3 sshd[6420]: fatal: Access denied for user  dwoodhou by PAM account configuration [preauth]

If I just comment out the pam_sss.so line from the *account* stack, I can log in again. Perhaps this is a pam_sss bug, not returning the correct result?
Comment 6 Tomas Mraz 2013-09-12 06:37:51 EDT
Perhaps pam_sss returns authinfo_unavail if it is misconfigured.

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