Bug 776600

Summary: pam winbind settings are only set if we join a windows domain using Yast as a client
Product: [openSUSE] openSUSE 12.2 Reporter: Forgotten User Ku1lZ_yaEZ <forgotten_Ku1lZ_yaEZ>
Component: SambaAssignee: The 'Opening Windows to a Wider World' guys <samba-maintainers>
Status: VERIFIED UPSTREAM QA Contact: The 'Opening Windows to a Wider World' guys <samba-maintainers>
Severity: Enhancement    
Priority: P5 - None CC: ddiss, jsuchome, samba-maintainers
Version: RC 2   
Target Milestone: ---   
Hardware: i586   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on: 770390    
Bug Blocks:    

Description Forgotten User Ku1lZ_yaEZ 2012-08-20 14:36:53 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/22.0.1190.0 Safari/537.1 SUSE/22.0.1190.0

If we are ourselves the domain controller such as with Samba4 AD, we have no way of setting pam winbind in /etc/pam.d

Reproducible: Always

Steps to Reproduce:
1.Install Samba4 DC
2.call the samba binary
3.edit /etc/nsswitch.conf to contain passwd: and group: to contain winbind
4.attempt to login on the DC
Actual Results:  
We are authenticated correctly via Kerberos but we cannot login: The pam settings for winbind are not set.

Expected Results:  
We can login. 

The workaround is not to use winbind on the Samba4 DC. e.g. nss-pam-ldapd works fine

This is discussed in this thread:
http://lists.opensuse.org/opensuse/2012-08/msg00476.html
Comment 1 Forgotten User Ku1lZ_yaEZ 2012-08-20 14:43:19 UTC
Lars suggested: 
Jiří Suchomel
jsuchome@suse.com
for this.

Hope that's OK.
Thanks.
Comment 2 Jiří Suchomel 2012-08-21 08:13:58 UTC
Have you tried using YaST samba client (called Window Domain Membership)?
Comment 3 Forgotten User Ku1lZ_yaEZ 2012-08-21 08:22:40 UTC
Yes, but this will only work for joining a client to an already existing domain. In this case the openSUSE box is itself already the domain controller. Maybe we could add something in the dialogue to cover this?

The settings are quite easy but I think with Samba4 just around the corner we should add this to Yast:

Here are the proposed pam settings from the Samba guys which don't work with 12.1 nor 12.2:

/etc/pam.d/common-auth
Add this line before pam_unix.so:
auth  sufficient  pam_winbind.so
Also add the option use_first_pass to the pam_unix.so line

/etc/pam.d/common-account
Add this line before pam_unix.so:
account sufficient pam_winbind.so

/etc/pam.d/common-session
Add these lines before any other session line:
session required pam_winbind.so

Thanks
Comment 4 Jiří Suchomel 2012-08-21 08:36:09 UTC
YaST does not edit PAM files directly, it uses pam-config.

Does pam-config support the situation above?
Comment 5 Forgotten User Ku1lZ_yaEZ 2012-08-21 09:02:47 UTC
Hi
winbind isn't mentioned in:
pam-config --help
Comment 6 Jiří Suchomel 2012-08-21 09:09:06 UTC
pam-config certainly can manage winbing (see man pam-config), as YaST is already using it.

The question is, if the details from comment 3 are supported.
Comment 7 Thorsten Kukuk 2012-08-21 09:31:46 UTC
The config in comment #3 is broken, it will lock out everybody including root if there is a problem with the network not comming up correct.

Lynn, why does pam-config -a --winbind not work for you on 12.1 and 12.2?
Comment 8 Forgotten User Ku1lZ_yaEZ 2012-08-21 14:55:48 UTC
OK
I'll use that.

I just thought it would be nice for tus to have something like a tick the box solution like pam-auth-config in Ubuntu.
Comment 9 Jiří Suchomel 2012-08-22 06:32:00 UTC
If 'pam-config -a --winbind' works for you, than should YaST module.

The checkbox "Use SMB Information for Linux Authentication" is exactly indicating usage of this pam-config call.
Comment 10 Forgotten User Ku1lZ_yaEZ 2012-08-22 08:14:31 UTC
Hi Jiri

I am not trying to join an openSUSE client to an existing domain. I am trying to get winbind authentication working via Samba4. I cannot chack the box "Use SMB Information for Linux Authentication" in windows Domain Membership because I am not joining a Linux client. I am already the 'windows' domain joined to myself simply by installing Samba4.

We do not have a Yast module to do this. If we are already the DC we need some way of activating winbind authentication.

With AD Domain Controller on Linux just around the corner (4th Sept. I think is the RC1 for Samba4) I really do think we should address this. Ubuntu have it: pam-auth-update and simply choose your flavour. We don't. 

Thanks,
L
Comment 11 Thorsten Kukuk 2012-08-22 08:30:46 UTC
(In reply to comment #10)
> Ubuntu have it: pam-auth-update and simply choose your flavour. We don't. 

Sorry, but we have exactly the same:

pam-config -a --winbind is the exact equivalent to pam-auth-update from Ubuntu for this case.

Only that the Ubuntu clone is much more restricted (as it can only copy PAM config files and is not able to generate them itself, so I don't understand why they had to invent the wheel again and not use the better original ;) ).
Comment 12 Jiří Suchomel 2012-08-22 08:40:50 UTC
So, Lars, would it make sense to allow "Use SMB Information for Linux Authentication" checkbox even without joining a domain?
Comment 13 David Disseldorp 2012-08-22 08:50:14 UTC
(In reply to comment #12)
> So, Lars, would it make sense to allow "Use SMB Information for Linux
> Authentication" checkbox even without joining a domain?

This behaviour would be very much specific to a Samba 4 AD DC setup. This bug should be made a duplicate (or child feature req) of bnc#770390 IMO.
Comment 14 Forgotten User Ku1lZ_yaEZ 2012-08-22 08:51:29 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Ubuntu have it: pam-auth-update and simply choose your flavour. We don't. 
> 
> Sorry, but we have exactly the same:
> 
> pam-config -a --winbind is the exact equivalent to pam-auth-update from Ubuntu
> for this case.
> 
> Only that the Ubuntu clone is much more restricted (as it can only copy PAM
> config files and is not able to generate them itself, so I don't understand why
> they had to invent the wheel again and not use the better original ;) ).

Yes, but it means typing nonsense at the command line. I can do it, but my parents and colleagues certainly can't! With Ubuntu I get a list to choose from. Sorry, but that's what people need.
Comment 15 Forgotten User Ku1lZ_yaEZ 2012-08-22 08:53:34 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > So, Lars, would it make sense to allow "Use SMB Information for Linux
> > Authentication" checkbox even without joining a domain?
> 
> This behaviour would be very much specific to a Samba 4 AD DC setup. This bug
> should be made a duplicate (or child feature req) of bnc#770390 IMO.

How about just put an extra option for 'I'm already the DC, let me use pam winbind anyway'

L x
Comment 16 Forgotten User Ku1lZ_yaEZ 2012-08-22 08:56:17 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > So, Lars, would it make sense to allow "Use SMB Information for Linux
> > Authentication" checkbox even without joining a domain?
> 
> This behaviour would be very much specific to a Samba 4 AD DC setup. This bug
> should be made a duplicate (or child feature req) of bnc#770390 IMO.


770390 refers to DNS, not PAM.
Comment 17 Lars Müller 2012-08-22 09:22:17 UTC
We have to ensure to keep this dialog simple and straight.

The main purpose is to join a domain and while we join this is a question of one extra click.

@Jiří: Do you see an easy and also user friendly way to add the required extra feature to the YaST Windows Domain Membership module without making the tool unfriendly from the usability point of view?
Comment 18 Jiří Suchomel 2012-08-22 11:36:55 UTC
Well, the required extra feature is saving the pam config, but not joining. We have to do less than we do now.

So, we may

1. offer (universal) checkbox with "Do not join" label or something
2. detect user's configuration state (Samba 4) and

a) ignore the join automatically (or based on some technical conditions)
b) explicitely ask user (via popup) if he also wants to join


So, what would you prefer? To me, it looks like some variant to option 2. What should I do to properly detect user's situation?
Comment 19 David Disseldorp 2012-08-22 11:54:14 UTC
(In reply to comment #18)
> Well, the required extra feature is saving the pam config, but not joining. We
> have to do less than we do now.
> 
> So, we may
> 
> 1. offer (universal) checkbox with "Do not join" label or something
> 2. detect user's configuration state (Samba 4) and
> 
> a) ignore the join automatically (or based on some technical conditions)
> b) explicitely ask user (via popup) if he also wants to join
> 
> 
> So, what would you prefer? To me, it looks like some variant to option 2. What
> should I do to properly detect user's situation?

Indeed, option 2 would be preferred. Ideally the user could select "AD Domain Controller" on the YaST Samba Server "Identity" tab, the resulting setup wizard would take the user through provisioning, DNS server setup, and later PAM configuration.
Comment 20 Jiří Suchomel 2012-08-22 12:15:25 UTC
(In reply to comment #19)

> Indeed, option 2 would be preferred. Ideally the user could select "AD Domain
> Controller" on the YaST Samba Server "Identity" tab, the resulting setup wizard
> would take the user through provisioning, DNS server setup, and later PAM
> configuration.

Well, but that is a complex solution for bug 770390, here.

I thought we want to have a simple one for this bug, which would fit to YaST Samba Client module...
Comment 21 Lars Müller 2012-08-22 12:19:30 UTC
Option 2 a from comment #18 is what I suggest to do.

While it should be possible to the user to overwrite the suggestion.

This plus Dave's comment #19 provides the required information.
Comment 22 David Disseldorp 2012-08-22 12:28:59 UTC
(In reply to comment #20)
> (In reply to comment #19)
> 
> > Indeed, option 2 would be preferred. Ideally the user could select "AD Domain
> > Controller" on the YaST Samba Server "Identity" tab, the resulting setup wizard
> > would take the user through provisioning, DNS server setup, and later PAM
> > configuration.
> 
> Well, but that is a complex solution for bug 770390, here.

Yes.

> I thought we want to have a simple one for this bug, which would fit to YaST
> Samba Client module...

IMO proceeding with the implementation for 2a from comment#18 wouldn't make
much sense prior to having other AD Domain Controller components (most
importantly Samba) configurable via YaST.
Comment 23 Jiří Suchomel 2012-08-23 13:14:50 UTC
(In reply to comment #19)

> Indeed, option 2 would be preferred. Ideally the user could select "AD Domain
> Controller" on the YaST Samba Server "Identity" tab, the resulting setup wizard
> would take the user through provisioning, DNS server setup, and later PAM
> configuration.

Now, neither this one nore bug 770390 describes what needs to be done for such Samba Server update.

Do you have a list of requirements anywhere? Preferably a feature request?
Comment 24 David Disseldorp 2012-08-23 13:28:16 UTC
(In reply to comment #23)
> (In reply to comment #19)
> 
> > Indeed, option 2 would be preferred. Ideally the user could select "AD Domain
> > Controller" on the YaST Samba Server "Identity" tab, the resulting setup wizard
> > would take the user through provisioning, DNS server setup, and later PAM
> > configuration.
> 
> Now, neither this one nore bug 770390 describes what needs to be done for such
> Samba Server update.
> 
> Do you have a list of requirements anywhere? Preferably a feature request?

Not yet, Samba4 is currently still in beta, hence the AD DC setup process changes regularly.
An RC should be coming next month, which would be a good point to finalize the UI and back-end configuration requirements.
Comment 26 Jiří Suchomel 2013-01-04 12:12:52 UTC
Moving to samba team: please clarify the requirements for YaST, if they are any.
Comment 27 Lars Müller 2013-01-08 10:43:46 UTC
There are no requirements for YaST at the moment.

The Samba 4 AD DC setup reply on the Heimdal Kerberos implementation, while SUSE uses the shipped system-wide MIT Kerberos.
Comment 28 Lars Müller 2013-01-08 11:41:13 UTC
The Samba 4 AD DC setup relies ...