[Samba] Samba 4 Create User Home Dir??

Rowland Penny rowlandpenny at googlemail.com
Sat Nov 29 12:09:37 MST 2014


On 29/11/14 18:30, Greg Zartman wrote:
> On Sat, Nov 29, 2014 at 2:18 AM, Rowland Penny 
> <rowlandpenny at googlemail.com <mailto:rowlandpenny at googlemail.com>> wrote:
>
>
>     This is one of the reasons that it is not recommended to use the
>     DC for anything other than authentication, see here:
>
>     https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO
>
>
> That is an unfortunate limitation of Samba 4 that will quite frankly 
> limit its use by quite a few small to medium sized businesses.  
> Requiring two separate machines for authentication and file sharing 
> isn't necessary from a resource standpoint. In many cases it would be 
> a waste of hardware.   MS Server doesn't have this limitation.

Yes, in this type of case, it is a big problem.

>
> I haven't yet figured out why the homedir setting in the active 
> directory is necessary for Samba itself.

There are two attributes in AD, 'HomeDirectory' & 'unixHomeDirectory', 
the first is used by windows, the second is what winbind is supposed to 
pull, it works on a member server but unfortunately not on the DC.

>   This is especially true given it just ignores the setting.  Perhaps 
> services like SSSD can pull this information from the Active Directory.
>

Yes, using sssd (or nslcd) is the only way to pull all the RFC2307 
attributes from AD.

> Are you saying that this is not going to work?
>
> [homes]
> comment = Home directory
> path = /home/e-smith/files/users/%S/home
>

Yes, [homes] is used with samba 3, you need to use [home] with samba 4 
and you would not use the path with [homes], but you would with [home]. 
You could set the template path in smb.conf, but there is also the macro 
problem (unless it as been fixed) '%S' will not get replaced.

There is a wiki page about users home share: 
https://wiki.samba.org/index.php/Setting_up_a_home_share

I know that this is not really what you want to hear, it might help if 
you add to my bug report:

https://bugzilla.samba.org/show_bug.cgi?id=10886

Rowland


More information about the samba mailing list