[Samba] Samba 4 Create User Home Dir??

Rowland Penny rowlandpenny at googlemail.com
Sat Nov 29 13:24:05 MST 2014


On 29/11/14 20:16, Greg Zartman wrote:
> On Sat, Nov 29, 2014 at 12:10 PM, Rowland Penny 
> <rowlandpenny at googlemail.com <mailto:rowlandpenny at googlemail.com>> wrote:
>
>>     Rowland,
>>
>>     Did I understand you correctly, that this will work in the home
>>     share? '/home/%WORKGROUP%/%ACCOUNTNAME%
>
>     It should, that is the default setting for 'template homedir' on
>     the DC.
>
>
> I'm just now playing around with samba-tool user create and I'm not 
> seeing how you can set the unixHomeDirectory attribute.
>
> I did this:
>
> samba-tool user create tom --home-directory=/home/tom
>
> I then get this in the AD:
>
> # record 48
> dn: CN=tom,CN=Users,DC=domain,DC=com
> objectClass: top
> objectClass: person
> objectClass: organizationalPerson
> objectClass: user
> cn: tom
> instanceType: 4
> whenCreated: 20141125062231.0Z
> whenChanged: 20141125062231.0Z
> uSNCreated: 3836
> name: tom
> objectGUID: 6ee0b95d-385d-4c8b-985f-772220aece1a
> badPwdCount: 0
> codePage: 0
> countryCode: 0
> homeDirectory: /home/tom
> badPasswordTime: 0
> lastLogoff: 0
> lastLogon: 0
> primaryGroupID: 513
> objectSid: S-1-5-21-2068039517-3712708137-1201588857-1117
> accountExpires: 9223372036854775807
> logonCount: 0
> sAMAccountName: tom
> sAMAccountType: 805306368
> userPrincipalName: tom at domain.com <mailto:tom at domain.com>
> objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=domain,DC=com
> pwdLastSet: 130613701510000000
> userAccountControl: 512
> uSNChanged: 3838
> distinguishedName: CN=tom,CN=Users,DC=domain,DC=com
>
> How are you setting the unixHomeDirectory attribute you mention earlier?
>
>
> -- 
> Greg J. Zartman
> Board Member
>
> Koozali Foundation, Inc.
> 2755 19th Street SE
> Salem, Oregon 97302
> Cell: 541-5218449 <tel:541-5218449>
>
> SME Server user and community member since 2000

Well, I have several ways of doing it, I have a patched version of 
samba-tool (why has the patch for 'unixHomeDirectory' never made it into 
samba-tool? ) I also have a bash script that uses ldb-tools. Finally I 
have PHP5 web application that will do it. you can use ldbedit, in fact 
that are many ways to add 'unixHomeDirectory'.

Rowland



More information about the samba mailing list