Re: [Samba] Samba4 Classicupgrade Failed

2013-01-23 Thread Mario Codeniera
Hi,

I used to solved this problem, hope that it will helps for others who will
encountered the same issue which took me days to figure it out. As you can
see the logs it is using python 2.4 (see for example File
"/usr/local/samba/lib/*python2.4/*site-packages/samba/netcmd/__init__.py",
line 142, in _run) even I told before that I used to upgrade to Python2.7
but "samba-tools domain classicupgrade" seems to see the Python2.4.

Here are the steps:
1) Install the needed packages for the Python2.7 first
*yum groupinstall "Development tools"*
*yum install zlib-devel*
*yum install bzip2-devel*
*yum install openssl-devel*
*yum install ncurses-devel*
*yum install readline-devel*

2) Download the Python source code. (You can use also latest version 3.xx)
*wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2*
*tar xvf Python-2.7.3.tar.bz2*
*./configure --prefix=/usr/local --with-threads --enable-shared*
*make && make install*
* T*ake note: you can use *make altinstall *(if you want two python
(a big and small, lol), meaning Python2.4 and Python2.7

*ln -s /usr/local/lib/libpython2.7.so.1.0 /usr/lib*
 If you can't find it, please do search.

3) Check the python if the version is correct.
*$python*

   Python 2.7.3 (default, Jan  23 2013, 16:43:58)
   [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
   Type "help", "copyright", "credits" or "license" for more
information.
   >>>

4) Optional (running before testing using step#3)
*wget
http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz
*
*tar xvf distribute-0.6.27.tar.gz*
*cd  distribute-0.6.27*
*python2.7 setup.py install*
*easy_install-2.7 virtualenv*

5) Finally check using yum
*yum search elinks*
*
*
Then refer to the howto in samba for details
*git clean -x -f -d*
*rm -rf /usr/local/samba*
recompile it back see
https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO#Step_2:_Compile_Samba

Viola! you will not able to see these logs anymore, but another steps of
problems soon you will encounter which is another story.
*
*

Thanks,
Mario
*
*

On Tue, Dec 4, 2012 at 3:21 PM, Mario Codeniera
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@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
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba4 Classicupgrade Failed

2012-12-07 Thread Andrew Bartlett
On Fri, 2012-12-07 at 17:56 +1300, Mario Codeniera wrote:
> 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'?

If you have another DC in the domain, you must indeed install Samba4 and
then run 'samba-tool domain promote' to make it a DC.

Andrew Bartlett

-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba4 Classicupgrade Failed

2012-12-06 Thread Mario Codeniera
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@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(): 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  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 ide

Re: [Samba] Samba4 Classicupgrade Failed

2012-12-03 Thread Gémes Géza

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@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(): 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
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@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


Re: [Samba] Samba4 Classicupgrade Failed

2012-12-03 Thread Mario Codeniera
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@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(): 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
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@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
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Samba4 Classicupgrade Failed

2012-12-03 Thread Mario Codeniera
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@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
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba