Bug 869273 - authconfig --enablewinbindauth does not add pam_winbind.so session entry
Summary: authconfig --enablewinbindauth does not add pam_winbind.so session entry
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: authconfig
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-23 13:02 UTC by Marko Myllynen
Modified: 2013-09-12 10:37 UTC (History)
4 users (show)

Fixed In Version: authconfig-6.2.5-1.fc18.2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-12 09:16:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marko Myllynen 2012-10-23 13:02:57 UTC
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 13:06:19 UTC
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 11:17:25 UTC
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 08:50:23 UTC
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 09:16:01 UTC
You must use --disablelocauthorize then.

Comment 5 David Woodhouse 2013-09-12 09:39:46 UTC
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 10:37:51 UTC
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.