[Samba] how to automatically create the home directory
Rowland penny
rpenny at samba.org
Thu Oct 10 14:09:09 UTC 2019
On 10/10/2019 14:49, Roy Eastwood wrote:
>> -----Original Message-----
>> From: samba [mailto:samba-bounces at lists.samba.org] On Behalf Of Rowland penny via samba
>> Sent: 10 October 2019 13:33
>> To: sambalist
>> Subject: Re: [Samba] how to automatically create the home directory
>>
>> On 10/10/2019 13:02, Mason Schmitt wrote:
>>> > There's fourth way, which is what is normally used in a
>>> Windows-only environment, but works just the same with home
>>> folders on a
>>> > samba DM fileserver.� �The method relies on creating the user
>>> with RSAT tools using ADUC.
>>> >
>>> > On the Profile tab, set a drive letter, eg H: to the path to the
>>> home folder, specifying the user's name as %username% for example:
>>> >
>>> > Connect H: to \fileserver.samdom.example.com
>>> <http://fileserver.samdom.example.com>\users\%username%
>>> >
>>> > (You can use the short name for the domain or as here the
>>> fqdn.)� � �Providing the Windows ACLs have been set up correctly
>>> on the
>>> > share the user's home directory is created automatically.� �No
>>> script is needed.
>>>
>>>
>>> Yes, that is another way, but, as far as I am aware, it only works on
>>> Windows ;-)
>>>
>>> If it does work on a Unix Domain member, then this is something I
>>> have
>>> missed.
>>>
>>>
>>> Yes, the method above does create the home directory on a Unix DM,
>>> even without using a PAM module.
>> Just tried on a W10 PC and it doesn't work for me, I just get:
>>
>> The \\raspberrypi.samdom.example.com\users\rowland home folder was not
>> created because the path was not found. This could be caused by listing
>> non-existent folders or by not finding the server or share. The user
>> account has been updated with the new home folder value but you must
>> create the folder manually.
>>
>> Windows can find the computer and the homes share, so, unless I am
>> missing something, this doesn't work for me.
>>
>> Rowland
> It does work, but you need the acl's (NTFS permission) to include Authenticated Users, which the samba WiIi doesn't specify. Take a look here:
> https://blogs.technet.microsoft.com/askds/2008/06/30/automatic-creation-of-user-folders-for-home-roaming-profile-and-redirected-folders/
>
> Can't believe I've found something Rowland doesn't know ;-)
>
> Roy
>
First, I have never claimed to know everything and the script was a
collaboration with Louis, so he doesn't know either ;-)
Having said that, 'Authenticated Users' is a Windows only group and
Samba knows nothing about it:
rowland at devstation:~$ wbinfo -n Authenticated\ Users
failed to call wbcLookupName: WBC_ERR_DOMAIN_NOT_FOUND
Could not lookup name Authenticated Users
rowland at devstation:~$ wbinfo -S S-1-5-11
failed to call wbcSidToUid: WBC_ERR_DOMAIN_NOT_FOUND
Could not convert sid S-1-5-11 to uid
So not having 'Authenticated Users' is probably not a problem.
Rowland
More information about the samba
mailing list