[Samba] Samba4 Classicupgrade Failed

Mario Codeniera mario.codeniera at gmail.com
Thu Dec 6 21:56:35 MST 2012


Thanks Geza.

I used to got almost migrate my data to Samba4 with this problem. I used to
create a new server with OpenLDAP 2.4 and enabling the openldap-client to
connect by itself. Migrate the data from the production server which I
change the domain name and removing those duplicate SID, but i got this
error message below. Hope anyone can give insights on it? Why I got this
problems.

What does it mean "Demoting BDC account trust for naruto-gure1, this DC
must be elevated to an AD DC"? Do i need to create another Samba4 to the
replication server ? or what do the command 'samba-tool domain promote'?


*
[root at gaara ambot]# /usr/local/samba/bin/samba-tool domain classicupgrade
--dbdir=/tmp/LiveData/var_lib_samba/samba --use-xattrs=yes
--realm=kazekage.sura.sandbox.local /tmp/smb.conf
Reading smb.conf
WARNING: Ignoring invalid value 'cups' for parameter 'printing'
Provisioning
Exporting account policy
Exporting groups
Ignoring group 'Everyone' S-1-1-0 listed but then not found: Unable to
enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Exporting users
 Demoting BDC account trust for naruto-gure1, this DC must be elevated to
an AD DC using 'samba-tool domain promote'
 Ignoring group memberships of 'root'
S-1-5-21-1511653421-423844657-761698953-1000: Unable to enumerate group
memberships, (-1073741596,NT_STATUS_INTERNAL_DB_CORRUPTION)
 Skipping wellknown rid=501 (for username=nobody)
 Demoting BDC account trust for naruto-app, this DC must be elevated to an
AD DC using 'samba-tool domain promote'
Next rid = 105011
Exporting posix attributes
Reading WINS database
Cannot open wins database, Ignoring: [Errno 2] No such file or directory:
'/srv/LiveData/var_lib_samba/samba/wins.dat'
Looking up IPv4 addresses
No IPv4 address will be assigned
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=kazekage,DC=sura,DC=sandbox,DC=local
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Setting acl on sysvol skipped
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=kazekage,DC=sura,DC=sandbox,DC=local
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
A Kerberos configuration suitable for Samba 4 has been generated at
/usr/local/samba/private/krb5.conf
Setting up fake yp server settings
Once the above files are installed, your Samba4 server will be ready to use
Admin password:        nT4C0k#Q1L=%tl5i&(@B>(Cw+H&:2
Server Role:           active directory domain controller
Hostname:              gaara
NetBIOS Domain:        KAZEKAGE
DNS Domain:            kazekage.sura.sandbox.local
DOMAIN SID:            S-1-5-21-1511653421-423844657-761698953
Importing WINS database
Importing Account policy
Importing idmap database
Importing groups
Group already exists sid=S-1-5-21-1511653421-423844657-761698953-512,
groupname=Domain Admins existing_groupname=Domain Admins, Ignoring.
Group already exists sid=S-1-5-21-1511653421-423844657-761698953-514,
groupname=Domain Guests existing_groupname=Domain Guests, Ignoring.
Group already exists sid=S-1-5-21-1511653421-423844657-761698953-515,
groupname=Domain Computers existing_groupname=Domain Computers, Ignoring.
Group already exists sid=S-1-5-32-544, groupname=Administrators
existing_groupname=Administrators, Ignoring.
Group already exists sid=S-1-5-32-546, groupname=Guests
existing_groupname=Guests, Ignoring.
ERROR(<type 'exceptions.KeyError'>): uncaught exception - 'No such element'
 File
"/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
line 175, in _run
    return self.run(*args, **kwargs)
 File
"/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py",
line 1318, in run
    useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs)
 File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
line 879, in upgrade_from_samba3
    add_group_from_mapping_entry(result.samdb, g, logger)
 File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
line 264, in add_group_from_mapping_entry
    str(groupmap.sid), groupmap.nt_name, msg[0]['sAMAccountName'][0])


*
On Tue, Dec 4, 2012 at 6:34 PM, Gémes Géza <geza at kzsdabas.hu> wrote:

> 2012-12-04 05:46 keltezéssel, Mario Codeniera írta:
>
>  Uprading on a New Server (Running on Centos 6.3, OpenLDAP 2.4.23 migrated
>> the data from existing server). I dunno know where to fix it, or someone
>> gave some idea how it works?
>>
>> [root at gaara samba]# /usr/local/samba/bin/samba-**tool domain
>> classicupgrade
>> --dbdir=/home/ambot/Downloads/**var/lib/samba --use-xattrs=yes
>> --realm=ewanko.local /etc/samba/smb.conf
>>
>> Reading smb.conf
>> WARNING: Ignoring invalid value 'cups' for parameter 'printing'
>> Provisioning
>> ERROR(<type 'exceptions.AttributeError'>): uncaught exception - 'NoneType'
>> object has no attribute 'strip'
>>    File
>> "/usr/local/samba/lib64/**python2.6/site-packages/samba/**
>> netcmd/__init__.py",
>> line 175, in _run
>>      return self.run(*args, **kwargs)
>>    File
>> "/usr/local/samba/lib64/**python2.6/site-packages/samba/**
>> netcmd/domain.py",
>> line 1318, in run
>>      useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs)
>>    File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**
>> upgrade.py",
>> line 600, in upgrade_from_samba3
>>      ldappass = (secrets_db.get_ldap_bind_pw(**ldapuser)).strip('\x00')
>>
>>
>> On Tue, Dec 4, 2012 at 3:21 PM, Mario Codeniera
>> <mario.codeniera at gmail.com>**wrote:
>>
>>  Hi,
>>>
>>> I am stuck on upgrading the current Samba3 to Samba4, currently used
>>> Samba
>>> 3.3.10 and upgraded to Samba 3.4.17 still the same problems below. I also
>>> try to upgrade the Python 2.4.3 to Python 2.7 still same problems, with
>>> the
>>> OpenLDAP 2.3.43.
>>>
>>>
>>> [root at ewanko]# /usr/local/samba/bin/samba-**tool domain classicupgrade
>>> --dbdir=/var/lib/samba/  --use-xattrs=yes  --realm=ewanko.local
>>> /etc/samba/smb.conf
>>> ERROR(exceptions.TypeError): uncaught exception - __init__() got an
>>> unexpected keyword argument 'epilog'
>>>    File "/usr/local/samba/bin/samba-**tool", line 44, in ?
>>>      retval = cmd._run("samba-tool", subcommand, *args)
>>>    File
>>> "/usr/local/samba/lib/python2.**4/site-packages/samba/netcmd/_**
>>> _init__.py",
>>> line 201, in _run
>>>      return self.subcommands[subcommand]._**run(
>>>    File
>>> "/usr/local/samba/lib/python2.**4/site-packages/samba/netcmd/_**
>>> _init__.py",
>>> line 201, in _run
>>>      return self.subcommands[subcommand]._**run(
>>>    File
>>> "/usr/local/samba/lib/python2.**4/site-packages/samba/netcmd/_**
>>> _init__.py",
>>> line 142, in _run
>>>      parser, optiongroups = self._create_parser(argv[0])
>>>    File
>>> "/usr/local/samba/lib/python2.**4/site-packages/samba/netcmd/_**
>>> _init__.py",
>>> line 130, in _create_parser
>>>      prog=prog,epilog=epilog)
>>>
>>>
>>> Are there any links for those successfully upgrade their samba 3 to samba
>>> 4?
>>>
>>>
>>> Regards,
>>> Mario
>>>
>>>  It seems that it couldn't find secrets.tdb to read the password to bind
> to ldap with it.
>
> Regards
>
> Geza Gemes
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/**mailman/options/samba<https://lists.samba.org/mailman/options/samba>
>


More information about the samba mailing list