On Friday, January 7, 2022, 12:10:27 p.m. EST, Rowland Penny via samba <samba at lists.samba.org> wrote: On Fri, 2022-01-07 at 17:02 +0000, Carl Hunter via samba wrote:> > > > > > Maybe what I mean by home folder is confusing things.? I was able to > test some things on my test system and the following is what seems to > work.? Again in quotes because I don't know why carriage returns > aren't working.? > "samba-tool user create username password --script-path=logon.cmd" > "samba-tool group addmembers students username" "mkdir > /home/username" "chown -R username:students /home/username" "chmod -R > o-rx /home/username" > I was hoping there was a way to have the mkdir, chown and chmod > command automatically run as part of the other commands.? Is that > possible?? >Before we go any further, do you have any Linux users or are all your client machines running Windows ? Rowland No Linux users, Windows only.?? Thanks Carl
On Fri, 2022-01-07 at 18:08 +0000, Carl Hunter wrote:> > > No Linux users, Windows only.OK, in AD there two home directory attributes: homeDirectory unixHomeDirectory The first is for the Windows home directory and will contain the computer that holds the share and the path to the home directory. This will be in Windows format, an example is: \\computername\users\username or \\devstation\users\rowland That is: The user 'rowland' has a share stored in the 'users' share on the computer called 'devstation' Provided that the 'homeDrive' attribute is set to a letter e.g. 'H:' This will cause Windows to mount the users share on 'H:' The unixHomeDirectory attribute contains the path to a Unix home directory e.g. /home/username This will supply the home directory for users on all Unix machines that use the winbind 'ad' backend. You only really need to set 'unixHomeDirectory' if your users will log into a Unix computer. A Windows user only needs to set the 'homeDirectory' attribute, the setting of which is shown on this link: https://wiki.samba.org/index.php/Windows_User_Home_Folders You only need to use the rfc2307 attributes if you are also running a Unix domain member as a fileserver and only then if you use the winbind 'ad' backend. Rowland