Mason Schmitt
2019-Oct-10 11:57 UTC
[Samba] how to automatically create the home directory
If you're on a RedHat system with selinux (RHEL, CentOS, fedora), then it looks like <https://danwalsh.livejournal.com/69837.html> pam_oddjob_mkhomedir will create the home directories for you and also ensure that the correct selinux labels are applied. I have this on my todo list, as I'm currently using the ADUC method, which is labour intensive. -- Mason On Thu, 10 Oct 2019 at 03:27, Rowland penny via samba <samba at lists.samba.org> wrote:> 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 > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
Rowland penny
2019-Oct-10 12:01 UTC
[Samba] how to automatically create the home directory
On 10/10/2019 12:57, Mason Schmitt wrote:> If you're on a RedHat system with selinux (RHEL, CentOS, fedora), then > it looks like > <https://danwalsh.livejournal.com/69837.html>?pam_oddjob_mkhomedir > will create the home directories for you and also ensure that the > correct selinux labels are applied.? I have this on my todo list, as > I'm currently using the ADUC method, which is labour intensive.This will only create the home directories if the user logs into the Unix domain member directly, it will not work if a user just connects to a Samba share. Rowland
Mason Schmitt
2019-Oct-10 12:05 UTC
[Samba] how to automatically create the home directory
> > > If you're on a RedHat system with selinux (RHEL, CentOS, fedora), then > > it looks like > > <https://danwalsh.livejournal.com/69837.html> pam_oddjob_mkhomedir > > will create the home directories for you and also ensure that the > > correct selinux labels are applied. I have this on my todo list, as > > I'm currently using the ADUC method, which is labour intensive. > > This will only create the home directories if the user logs into the > Unix domain member directly, it will not work if a user just connects to > a Samba share. >Oh, that's good to know. Thanks. I'm now interested in the script that you and Louis wrote. May I have a copy? -- Mason