[Samba] template homedir

Peter Carlson peter at howudodat.com
Fri Oct 14 14:16:56 UTC 2022


On 10/13/22 08:54, Rowland Penny via samba wrote:
>
>
> On 13/10/2022 16:38, Peter Carlson via samba wrote:
>> Hi Rowland,
>>
>> I didn't want to put the actual names in the email, so I'll put the 
>> pertinant part of [global] with the name slightly changed
>>
>> [global]
>>      netbios name = NC1
>>      realm = PETERCARLSON.LOCAL
>>      server role = active directory domain controller
>>      server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, 
>> drepl, winbindd, ntp_signd, kcc, dnsupdate
>>      workgroup = SPC
>>      idmap_ldb:use rfc2307 = yes
>>
>>
>> home folders are getting created as : /home/peter at petercarlson.local 
>> and not peter at SPC
>
> By default the template homedir is /home/%D/%U where '%D' is the 
> workgroup (in this case 'SPC') and '%U' is the username, which means 
> you should be getting /home/SPC/peter. You do not seem to be getting 
> this, so I presume that you have set the 'unixHomeDirectory' attribute 
> in AD, if so, what did you use for the value.
>
> I suppose that I should point that Samba does not recommend using a DC 
> as a fileserver.
>
> Rowland

This was on a newly setup server that will serve as a Terminal Server.  
I have 3 servers: DC, FileServer and xRDP.  However I re-spun the xRDP 
server and ran realm join and now it uses shortname instead of the 
longname, so it must have been something I did wrong the first time I 
joined the domain.  PS: unixHomeDirectory attribute was empty.

So we are all good now.




More information about the samba mailing list