saltstack-formulas / samba-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
16 stars 72 forks source link

Winbind: Introduce WINBIND and WINBIND-AD states #32

Closed noelmcloughlin closed 6 years ago

noelmcloughlin commented 6 years ago

This PR introduces support for RFE #22, introducing and documenting Winbind features. See log demonstrating the feature on ubuntu (minor issues in log fixed in updated commit). Formula now supports Samba ROLE_STANDALONE and ROLE_DOMAIN_MEMBER roles (Ubuntu and Centos7).

Ubuntu Log: ubuntu_smb_winbind.log.txt Centos Log: centos_winbindAD.log.txt (Note: failure to start winbind service is expected and documented behaviour - we need to join a domain before winbind will start).

After executing samba.winbind-ad state, AD integration is three commands ...

[posixuser@centos73 ~]$ sudo net ads join EXAMPLE.COM -U domainadm
Enter domainadm's password:
Using short domain name -- EXAMPLE
Joined 'centos73' to dns domain 'example.com'
[posixuser@centos73 ~]$ sudo kinit -k centos73\$@EXAMPLE.COM
[posixuser@centos73 ~]$ sudo systemctl restart winbind

laptop: messi$ ssh domainadm@centos73.example.com
domainadm@centos73.example.com's password: 
Kickstarted on 2017-12-11
noelmcloughlin commented 6 years ago

@gravyboat could you review please. thanks.

noelmcloughlin commented 6 years ago

@ryanwalder Hi Ryan, Could you review this single PR please as encapsulates entire feature.

noelmcloughlin commented 6 years ago

Verified on openSuSE: opensuse.log.txt with these pillars:

samba:
  role: ROLE_DOMAIN_MEMBER
  conf:
    render:
      section_order: ['global', 'homes', 'printers',]
    sections:
      global:
        workgroup: EXAMPLE
        max log size: 50
        bind interfaces only: True
        interfaces: lo eth0 bond0 em0
      global_winbind_ad:
        realm: EXAMPLE.COM
        security: ADS
  winbind:
    krb5_default_realm: EXAMPLE.COM
gravyboat commented 6 years ago

@noelmcloughlin Sorry for not responding. I am no longer a member of this team so I don't do reviews any longer.