Usage of

Charles Tryon charles.tryon at
Fri Nov 12 07:46:14 MST 2010


  Mark Rutherford was so kind as to send me his copy of the
script, so I have a working copy of the script. (I found a copy in an list
archive, but the indenting was foobared, which really confused Python!)
 However, with my still limited knowledge of Samba4 and Python, I'm having a
lot of difficulty figuring out how to use it to migrate users out of my
existing Samba3/Fedora389 setup into a new Samba4 domain I am trying to

  I am currently running S4 from the git repository (last pull on 11/11).  I
used the HOWTO at to set up the
domain.  I have Dynamic DNS working with DHCP, and I believe Kerberos is
working correctly.  I can add users through the "samba-tool", and join both
XP and Windows7 machines to the domain.  I even have the Microsoft AD
administrative tools talking to the domain to add or manage users.

  My problem is that I would like to migrate over a large number of existing
users and machines to the domain such that if I shut down the old domain and
connect the new one, the users and machines won't know the difference.

  What I have done is to provision a clean domain:

    sudo /usr/local/samba/sbin/provision \
                    --domain=ARDA \
                    --adminpass=Xxxxxxx \
                    --server-role='domain controller'

  I then tried to run the migrate script, trying to guess at the parameters:

    ./      \
        --ldap_uri=ldap:// \     URI of existing
        --ldap_binddn="CN=Directory Manager"     \      binddn    "
        --ldap_bindpwd="Yyyyyyy"      \                 passwd   "
        --output_basedn="dc=bbaggins,dc=net"     \
        --input_domain_name=SHIRE        \
        --input_basedn="dc=bbaggins,dc=net"      \
        --import_accounts=Users        \

  The response I get is:

Traceback (most recent call last):
  File "./", line 1934, in <module>
  File "./", line 1927, in run
  File "./", line 449, in __init__
  File "./", line 1713, in convertObjects
  File "./", line 1371, in convert_sambaSamAccount
    assert keep != remove, 'keep[%s] remove[%s] error attr[%s] in: %s\n' %
(str(keep), str(remove), attr, str(old))
AssertionError: keep[False] remove[False] error attr[ntUserDomainId] in:
{'cn': ['Sam Tryon'], 'objectClass': ['top', 'person', 'account',
'organizationalPerson', 'inetorgperson', 'ntuser', 'posixAccount',
'sambaSamAccount'], 'uidNumber': ['11008'], 'sambaAcctFlags': ['[U
 ]'], 'sambaPrimaryGroupSID':
['S-1-5-21-1104678897-1477468196-890409133-513'], 'uid': ['sam'],
'sambaHomePath': ['\\\\weathertop\\homes\\'], 'userPassword': ['{crypt}'],
'sambaProfilePath': ['\\\\weathertop\\profiles\\sam'], 'sambaPwdMustChange':
['7776000'], 'mail': ['laadass at'], 'sambaLogonScript':
['OMLOGON.CMD'], 'loginShell': ['/bin/bash'], 'gidNumber': ['5004'],
'sambaPwdLastSet': ['1288209778'], 'sambaNTPassword':
['FAE44DBF10C32BEB313D3DDF1235280D'], 'ntUserDomainId': ['Sam.Tryon'],
'homePhone': ['770-631-3448', '770-851-2879'], 'telephoneNumber': ['5207'],
'sambaHomeDrive': ['N:'], 'sambaSID':
['S-1-5-21-1104678897-1477468196-890409133-11008'], 'gecos': ['Sam Tryon'],
'sn': ['Tryon'], 'homeDirectory': ['/home/sam'], 'givenName': ['Sam']}

  Any hints on what is going on here?

    Charles Tryon
      "It's the job that's never started that takes longest to finish."
                                 -- Samwise Gamgee

More information about the samba-technical mailing list