> -----Original Message----- > From: samba [mailto:samba-bounces at lists.samba.org] On Behalf Of Rowland penny via samba > Sent: 10 October 2019 11:27 > To: samba at lists.samba.org > Subject: Re: [Samba] how to automatically create the home directory > > On 10/10/2019 11:14, Stefan G. Weichinger via samba wrote: > > Customer asks why [home] doesn't work for a new AD user, turns out the > > linux directory doesn't exist on the DM server > > > > How to let that directory be created? > > > > GPO? > > > > I find this: > > > > https://wiki.samba.org/index.php/User_Home_Folders#Using_Active_Directory_Users_and_Computers > > > > but the GPO seems only to create the network drive ... but not the > > directory on the samba server itself. > > > > hints? > > > > thanks all ... > > > There are three ways, depending on how the user connects. > > You can manually create a home directory for each user. > > If the user actually logs into the unix domain member, you can lever PAM > to create the home directory the first the user connects > > If the user only connects over Samba, then you need to create the users > home directory with a script. Myself and Louis wrote such a script, > would you like a copy ? > > RowlandThere'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\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. HTH Roy
Rowland penny
2019-Oct-10 11:56 UTC
[Samba] how to automatically create the home directory
On 10/10/2019 12:19, Roy Eastwood via samba wrote:>> -----Original Message----- >> From: samba [mailto:samba-bounces at lists.samba.org] On Behalf Of Rowland penny via samba >> Sent: 10 October 2019 11:27 >> To: samba at lists.samba.org >> Subject: Re: [Samba] how to automatically create the home directory >> >> On 10/10/2019 11:14, Stefan G. Weichinger via samba wrote: >>> Customer asks why [home] doesn't work for a new AD user, turns out the >>> linux directory doesn't exist on the DM server >>> >>> How to let that directory be created? >>> >>> GPO? >>> >>> I find this: >>> >>> https://wiki.samba.org/index.php/User_Home_Folders#Using_Active_Directory_Users_and_Computers >>> >>> but the GPO seems only to create the network drive ... but not the >>> directory on the samba server itself. >>> >>> hints? >>> >>> thanks all ... >>> >> There are three ways, depending on how the user connects. >> >> You can manually create a home directory for each user. >> >> If the user actually logs into the unix domain member, you can lever PAM >> to create the home directory the first the user connects >> >> If the user only connects over Samba, then you need to create the users >> home directory with a script. Myself and Louis wrote such a script, >> would you like a copy ? >> >> Rowland > 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\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. > > HTH > > Roy > >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. Rowland
Mason Schmitt
2019-Oct-10 12:02 UTC
[Samba] how to automatically create the home directory
> > 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\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. -- Mason