ipa-adtrust-install: configure host netbios name by default

Ensure we set host netbios name by default in smb.conf

https://fedorahosted.org/freeipa/ticket/4116
This commit is contained in:
Alexander Bokovoy 2014-01-17 14:09:34 +02:00 committed by Martin Kosek
parent 3264b0eaaf
commit 531ede2904
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
[global] [global]
workgroup = $NETBIOS_NAME workgroup = $NETBIOS_NAME
netbios name = $HOST_NETBIOS_NAME
realm = $REALM realm = $REALM
kerberos method = dedicated keytab kerberos method = dedicated keytab
dedicated keytab file = FILE:/etc/samba/samba.keytab dedicated keytab file = FILE:/etc/samba/samba.keytab

View File

@ -124,6 +124,7 @@ class ADTRUSTInstance(service.Service):
self.secondary_rid_base = None self.secondary_rid_base = None
self.fqdn = None self.fqdn = None
self.host_netbios_name = None
self.realm = None self.realm = None
self.domain_name = None self.domain_name = None
@ -151,6 +152,7 @@ class ADTRUSTInstance(service.Service):
# Values obtained from API.env # Values obtained from API.env
self.fqdn = self.fqdn or api.env.host self.fqdn = self.fqdn or api.env.host
self.host_netbios_name = make_netbios_name(self.fqdn)
self.realm = self.realm or api.env.realm self.realm = self.realm or api.env.realm
self.domain_name = self.domain_name or api.env.domain self.domain_name = self.domain_name or api.env.domain
@ -769,6 +771,7 @@ class ADTRUSTInstance(service.Service):
self.sub_dict = dict(REALM = self.realm, self.sub_dict = dict(REALM = self.realm,
SUFFIX = self.suffix, SUFFIX = self.suffix,
NETBIOS_NAME = self.netbios_name, NETBIOS_NAME = self.netbios_name,
HOST_NETBIOS_NAME = self.host_netbios_name,
SMB_DN = self.smb_dn, SMB_DN = self.smb_dn,
LDAPI_SOCKET = self.ldapi_socket, LDAPI_SOCKET = self.ldapi_socket,
FQDN = self.fqdn) FQDN = self.fqdn)