From 7358fdd85215b9ee9becb2e352480abd2789691f Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Fri, 17 Jan 2014 14:09:34 +0200 Subject: [PATCH 34/34] 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 --- install/share/smb.conf.template | 1 + ipaserver/install/adtrustinstance.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/install/share/smb.conf.template b/install/share/smb.conf.template index 086b0fcfe5cff2bc3582f2a89962a99c9095b4bb..2908b998cc85fcb84f60847135aaa4b008e121f8 100644 --- a/install/share/smb.conf.template +++ b/install/share/smb.conf.template @@ -1,5 +1,6 @@ [global] workgroup = $NETBIOS_NAME +netbios name = $HOST_NETBIOS_NAME realm = $REALM kerberos method = dedicated keytab dedicated keytab file = FILE:/etc/samba/samba.keytab diff --git a/ipaserver/install/adtrustinstance.py b/ipaserver/install/adtrustinstance.py index 4aa8322e3e2cfb6fbc07696097c3e6e21fc7f665..621e3fd46780beb15f3d642cb9e3eb1c5fa721ad 100644 --- a/ipaserver/install/adtrustinstance.py +++ b/ipaserver/install/adtrustinstance.py @@ -124,6 +124,7 @@ def __init__(self, fstore=None): self.secondary_rid_base = None self.fqdn = None + self.host_netbios_name = None self.realm = None self.domain_name = None @@ -151,6 +152,7 @@ def __setup_default_attributes(self): # Values obtained from API.env 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.domain_name = self.domain_name or api.env.domain @@ -769,6 +771,7 @@ def __setup_sub_dict(self): self.sub_dict = dict(REALM = self.realm, SUFFIX = self.suffix, NETBIOS_NAME = self.netbios_name, + HOST_NETBIOS_NAME = self.host_netbios_name, SMB_DN = self.smb_dn, LDAPI_SOCKET = self.ldapi_socket, FQDN = self.fqdn) -- 1.8.4.2