[Samba] Samba 4.1.0pre1 and problem from creating home users dir from command line

Adam Sienkiewicz adamsienkiewicz78 at gmail.com
Fri Jan 4 01:41:56 MST 2013

Hi all;

I successfully run samba 4 as DC. Joining win7 into it working, mobile
profiles also. I used this tutorial:
 Because in my domain I will use few hundred acccounts I want to automate
account creating in my domain.
I would like to do that via bash script from linux side.
I tried to create account via command:

./samba-tool user create demo8
p at ssw0rd--profile-path=\\deb7smb4ad.szyb.local\profiles\demo8

account were created, in dsa.msc snap-in I can see this account with
settings like profile path and home dir but there is a problem - this way
of creating account doesn't create home dir for user.
To do that I have to go into user demo8 properties, choose tab profile and
for a while change opition for home folder - local path and back to map as
After that home folder in shared home2 dir is created and user
has automatically maped his home folder as h: drive.

My question is - is any other way to automatically home dir creation during
account create without dsa.msc usage - for scripting it will be greate if I
can force samba-tool to create this directory.

Here is my smb.conf:

root at deb7smb4ad:~# cat /usr/local/samba/etc/smb.conf
# Global parameters
workgroup = SZYB
realm = SZYB.LOCAL
netbios name = DEB7SMB4AD
server role = active directory domain controller
server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind,
ntp_signd, kcc, dnsupdate

path = /usr/local/samba/var/locks/sysvol/szyb.local/scripts
read only = No

path = /usr/local/samba/var/locks/sysvol
read only = No
comment=home dirs
read only = No
;directory_mode: parameter = 0700
    comment = All Printers
    path = /usr/local/samba/var/spool
    browseable = Yes
    read only = No
    printable = Yes
    comment = Point and Print Printer Drivers
    path = /usr/local/samba/var/print
    read only = No
      path = /usr/local/samba/var/profiles
      read only = no

my fstab looks like:

/dev/mapper/deb7smb4ad-root /               ext4
 user_xattr,acl,barrier=1,errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=f197b0c8-11d5-474e-bedf-4889542d3ee4 /boot           ext2    defaults
       0       2
/dev/mapper/deb7smb4ad-home /home           ext4
 user_xattr,acl,barrier=1        0       2
/dev/mapper/deb7smb4ad-swap_1 none            swap    sw              0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

Can I use for this mkdir command and next samba-tool ntacl subcommand ?

More information about the samba mailing list