Quantcast

errors/issues when trying to migrate

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

errors/issues when trying to migrate

Marc Muehlfeld-2
Hi,

I'm playing in my test environment with a migration from s3 to the latest git
version. My s3 is in LDAP and I followed the HowTo.

But I'm having the following issues/errors when running
# /usr/local/samba/bin/samba-tool domain samba3upgrade
--dbdir=/usr/var/locks3/ --use-xattrs=yes --realm=MUC.medizinische-genetik.de
/etc/samba/smb3.conf




1.) tdb(/usr/var/locks3/gencache.tdb):Corrupt database: Record offset 696 has
incorrect hash
gencache_init: tdb_check(/usr/var/locks3/gencache.tdb) failed - retry after
truncate

It's nothing serious. The script just continues.





2.) Exporting groups
Ignoring group 'Print Operators' S-1-5-32-550 listed but then not found:
Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Ignoring group 'Backup Operators' S-1-5-32-551 listed but then not found:
Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Ignoring group 'Replicator' S-1-5-32-552 listed but then not found: Unable to
enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Ignoring group 'Administrators' S-1-5-32-544 listed but then not found: Unable
to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Ignoring 'well known' group 'Guests' (should already be in AD, and have no
members)
Ignoring group 'Account Operators' S-1-5-32-548 listed but then not found:
Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Ignoring group 'Server Operators' S-1-5-32-549 listed but then not found:
Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Ignoring group 'Power Users' S-1-5-32-547 listed but then not found: Unable to
enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
Ignoring group 'Users' S-1-5-32-545 listed but then not found: Unable to
enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)

The script continues, but this groups are all ignored. Any idea why?




3.) Importing WINS database
ERROR(<type 'exceptions.ValueError'>): uncaught exception - invalid literal
for int() with base 16: ''
   File
"/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
line 160, in _run
     return self.run(*args, **kwargs)
   File
"/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line
926, in run
     useeadb=eadb)
   File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
line 683, in upgrade_from_samba3
     samba3_winsdb = samba3.get_wins_db()
   File
"/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
line 399, in get_wins_db
     return WinsDatabase(self.statedir_path("wins.dat"))
   File
"/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
line 333, in __init__
     nb_flags = int(entries[i][:-1], 16)

Here the script crashes and stops. The only way to continue, is to delete
wins.dat. Maybe the script can continue, if the WINS import failes.




4.) Adding users to groups
ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception -
ProvisioningError: Could not add member
'S-1-5-21-1362721961-1801182073-732966438-2996' to group
'S-1-5-21-1362721961-1801182073-732966438-512' as either group or user record
doesn't exist: Unable to find GUID for DN

   File
"/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
line 160, in _run
     return self.run(*args, **kwargs)
   File
"/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line
926, in run
     useeadb=eadb)
   File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
line 728, in upgrade_from_samba3
     add_users_to_group(result.samdb, g, groupmembers[str(g.sid)], logger)
   File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
line 242, in add_users_to_group
     raise ProvisioningError("Could not add member '%s' to group '%s' as
either group or user record doesn't exist: %s" % (member_sid, group.sid, emsg))

Here the script crash and stop again.
S-1-5-21-1362721961-1801182073-732966438-2996 in LDAP = Administrator
S-1-5-21-1362721961-1801182073-732966438-512 in LDAP = Group "Domain Admins"

If I delete the user Administator from LDAP, the script run up to the end.



Regards,
Marc
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: errors/issues when trying to migrate

ctryon
I'm working on a similar issue with groups, only my S3 domain used the tdb
back end, and the /etc/passwd and /etc/group files.  I'm getting similar
error messages with my groups.  My script completes to the end, but there
are no groups created.

On Fri, May 25, 2012 at 10:43 AM, Marc Muehlfeld <
[hidden email]> wrote:

> Hi,
>
> I'm playing in my test environment with a migration from s3 to the latest
> git version. My s3 is in LDAP and I followed the HowTo.
>
> But I'm having the following issues/errors when running
> # /usr/local/samba/bin/samba-**tool domain samba3upgrade
> --dbdir=/usr/var/locks3/ --use-xattrs=yes --realm=MUC.medizinische-**
> genetik.de <http://MUC.medizinische-genetik.de> /etc/samba/smb3.conf
>
>
>
>
> 1.) tdb(/usr/var/locks3/gencache.**tdb):Corrupt database: Record offset
> 696 has incorrect hash
> gencache_init: tdb_check(/usr/var/locks3/**gencache.tdb) failed - retry
> after truncate
>
> It's nothing serious. The script just continues.
>
>
>
>
>
> 2.) Exporting groups
> Ignoring group 'Print Operators' S-1-5-32-550 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_**
> SUCH_ALIAS)
> Ignoring group 'Backup Operators' S-1-5-32-551 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_**
> SUCH_ALIAS)
> Ignoring group 'Replicator' S-1-5-32-552 listed but then not found: Unable
> to enumerate members for alias, (-1073741487,NT_STATUS_NO_**SUCH_ALIAS)
> Ignoring group 'Administrators' S-1-5-32-544 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_**
> SUCH_ALIAS)
> Ignoring 'well known' group 'Guests' (should already be in AD, and have no
> members)
> Ignoring group 'Account Operators' S-1-5-32-548 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_**
> SUCH_ALIAS)
> Ignoring group 'Server Operators' S-1-5-32-549 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_**
> SUCH_ALIAS)
> Ignoring group 'Power Users' S-1-5-32-547 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_**
> SUCH_ALIAS)
> Ignoring group 'Users' S-1-5-32-545 listed but then not found: Unable to
> enumerate members for alias, (-1073741487,NT_STATUS_NO_**SUCH_ALIAS)
>
> The script continues, but this groups are all ignored. Any idea why?
>
>
>
>
> 3.) Importing WINS database
> ERROR(<type 'exceptions.ValueError'>): uncaught exception - invalid
> literal for int() with base 16: ''
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**netcmd/__init__.py",
> line 160, in _run
>    return self.run(*args, **kwargs)
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**netcmd/domain.py",
> line 926, in run
>    useeadb=eadb)
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**upgrade.py",
> line 683, in upgrade_from_samba3
>    samba3_winsdb = samba3.get_wins_db()
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**samba3/__init__.py",
> line 399, in get_wins_db
>    return WinsDatabase(self.statedir_**path("wins.dat"))
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**samba3/__init__.py",
> line 333, in __init__
>    nb_flags = int(entries[i][:-1], 16)
>
> Here the script crashes and stops. The only way to continue, is to delete
> wins.dat. Maybe the script can continue, if the WINS import failes.
>
>
>
>
> 4.) Adding users to groups
> ERROR(<class 'samba.provision.**ProvisioningError'>): uncaught exception
> - ProvisioningError: Could not add member 'S-1-5-21-1362721961-**1801182073-732966438-2996'
> to group 'S-1-5-21-1362721961-**1801182073-732966438-512' as either group
> or user record doesn't exist: Unable to find GUID for DN
>
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**netcmd/__init__.py",
> line 160, in _run
>    return self.run(*args, **kwargs)
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**netcmd/domain.py",
> line 926, in run
>    useeadb=eadb)
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**upgrade.py",
> line 728, in upgrade_from_samba3
>    add_users_to_group(result.**samdb, g, groupmembers[str(g.sid)], logger)
>  File "/usr/local/samba/lib64/**python2.6/site-packages/samba/**upgrade.py",
> line 242, in add_users_to_group
>    raise ProvisioningError("Could not add member '%s' to group '%s' as
> either group or user record doesn't exist: %s" % (member_sid, group.sid,
> emsg))
>
> Here the script crash and stop again.
> S-1-5-21-1362721961-**1801182073-732966438-2996 in LDAP = Administrator
> S-1-5-21-1362721961-**1801182073-732966438-512 in LDAP = Group "Domain
> Admins"
>
> If I delete the user Administator from LDAP, the script run up to the end.
>
>
>
> Regards,
> Marc
>



--
    Charles Tryon
_________________________________________________________________________
  “Risks are not to be evaluated in terms of the probability of success,
but in terms of the value of the goal.”
                - Ralph D. Winter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: errors/issues when trying to migrate

Andrew Bartlett
In reply to this post by Marc Muehlfeld-2
On Fri, 2012-05-25 at 16:43 +0200, Marc Muehlfeld wrote:

> Hi,
>
> I'm playing in my test environment with a migration from s3 to the latest git
> version. My s3 is in LDAP and I followed the HowTo.
>
> But I'm having the following issues/errors when running
> # /usr/local/samba/bin/samba-tool domain samba3upgrade
> --dbdir=/usr/var/locks3/ --use-xattrs=yes --realm=MUC.medizinische-genetik.de
> /etc/samba/smb3.conf
>
>
>
>
> 1.) tdb(/usr/var/locks3/gencache.tdb):Corrupt database: Record offset 696 has
> incorrect hash
> gencache_init: tdb_check(/usr/var/locks3/gencache.tdb) failed - retry after
> truncate
>
> It's nothing serious. The script just continues.

Indeed, gencache is only a cache, and therefore not required for
migration.

> 2.) Exporting groups
> Ignoring group 'Print Operators' S-1-5-32-550 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> Ignoring group 'Backup Operators' S-1-5-32-551 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> Ignoring group 'Replicator' S-1-5-32-552 listed but then not found: Unable to
> enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> Ignoring group 'Administrators' S-1-5-32-544 listed but then not found: Unable
> to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> Ignoring 'well known' group 'Guests' (should already be in AD, and have no
> members)
> Ignoring group 'Account Operators' S-1-5-32-548 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> Ignoring group 'Server Operators' S-1-5-32-549 listed but then not found:
> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> Ignoring group 'Power Users' S-1-5-32-547 listed but then not found: Unable to
> enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> Ignoring group 'Users' S-1-5-32-545 listed but then not found: Unable to
> enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>
> The script continues, but this groups are all ignored. Any idea why?

A number of Samba3 databases appear to have aliases templates for these
well known groups, but if they are not mapped to system groups, then
this will happen.  That's why we ignore the error, because clearly there
are no users in these groups.

> 3.) Importing WINS database
> ERROR(<type 'exceptions.ValueError'>): uncaught exception - invalid literal
> for int() with base 16: ''
>    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
> line 160, in _run
>      return self.run(*args, **kwargs)
>    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line
> 926, in run
>      useeadb=eadb)
>    File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
> line 683, in upgrade_from_samba3
>      samba3_winsdb = samba3.get_wins_db()
>    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
> line 399, in get_wins_db
>      return WinsDatabase(self.statedir_path("wins.dat"))
>    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
> line 333, in __init__
>      nb_flags = int(entries[i][:-1], 16)
>
> Here the script crashes and stops. The only way to continue, is to delete
> wins.dat. Maybe the script can continue, if the WINS import failes.

I need a sample of the failed wins.dat, so we can fix the parsing
script.

> 4.) Adding users to groups
> ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception -
> ProvisioningError: Could not add member
> 'S-1-5-21-1362721961-1801182073-732966438-2996' to group
> 'S-1-5-21-1362721961-1801182073-732966438-512' as either group or user record
> doesn't exist: Unable to find GUID for DN
>
>    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
> line 160, in _run
>      return self.run(*args, **kwargs)
>    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line
> 926, in run
>      useeadb=eadb)
>    File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
> line 728, in upgrade_from_samba3
>      add_users_to_group(result.samdb, g, groupmembers[str(g.sid)], logger)
>    File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
> line 242, in add_users_to_group
>      raise ProvisioningError("Could not add member '%s' to group '%s' as
> either group or user record doesn't exist: %s" % (member_sid, group.sid, emsg))
>
> Here the script crash and stop again.
> S-1-5-21-1362721961-1801182073-732966438-2996 in LDAP = Administrator
> S-1-5-21-1362721961-1801182073-732966438-512 in LDAP = Group "Domain Admins"
>
> If I delete the user Administator from LDAP, the script run up to the end.

The issue would be that Administrator should have a SID ending in -500.
We already skip accounts "root" and "administrator" and map the password
on to the Administrator account we build at provision time.  This does
however mean that we break when trying to import the incorrect
administrator as a group member.

In this case, I think we need to both more clearly detect this, and ask
you to fix your database prior to importation.

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: errors/issues when trying to migrate

Marc Muehlfeld-2
Am 26.05.2012 07:41, schrieb Andrew Bartlett:
>> 2.) Exporting groups
>> Ignoring group 'Print Operators' S-1-5-32-550 listed but then not found:
>> Unable to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
 >> ...
>>
>> The script continues, but this groups are all ignored. Any idea why?
>
> A number of Samba3 databases appear to have aliases templates for these
> well known groups, but if they are not mapped to system groups, then
> this will happen.  That's why we ignore the error, because clearly there
> are no users in these groups.

What is an alias template?

In some of this groups I have users, like in "print operators". This is my
LDAP export of one of these groups:

dn: cn=Print Operators,ou=Groups,dc=mr,dc=lfmg,dc=de
objectClass: posixGroup
objectClass: sambaGroupMapping
cn: Print Operators
description: Netbios Domain Print Operators
displayName: Print Operators
gidNumber: 550
memberUid: technik
memberUid: Administrator
sambaGroupType: 5
sambaSID: S-1-5-32-550





>> Here the script crashes and stops. The only way to continue, is to delete
>> wins.dat. Maybe the script can continue, if the WINS import failes.
>
> I need a sample of the failed wins.dat, so we can fix the parsing
> script.

Find the wins.dat attached.





>> ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception -
>> ProvisioningError: Could not add member
>> 'S-1-5-21-1362721961-1801182073-732966438-2996' to group
>> 'S-1-5-21-1362721961-1801182073-732966438-512' as either group or user record
>> doesn't exist: Unable to find GUID for DN
 >
> The issue would be that Administrator should have a SID ending in -500.
> We already skip accounts "root" and "administrator" and map the password
> on to the Administrator account we build at provision time.  This does
> however mean that we break when trying to import the incorrect
> administrator as a group member.

I'll fix the SID of this account. But should there be some code added around
to skip this failure, if others having a wrong SID for 'administator' too? Or
at least a message, what's wrong.




Thanks for your information.


Regards,
Marc




wins.tar.bz2 (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: errors/issues when trying to migrate

simo
In reply to this post by Andrew Bartlett
On Sat, 2012-05-26 at 15:41 +1000, Andrew Bartlett wrote:

> >
> > If I delete the user Administator from LDAP, the script run up to
> the end.
>
> The issue would be that Administrator should have a SID ending in
> -500.
> We already skip accounts "root" and "administrator" and map the
> password
> on to the Administrator account we build at provision time.  This does
> however mean that we break when trying to import the incorrect
> administrator as a group member.
>
> In this case, I think we need to both more clearly detect this, and
> ask
> you to fix your database prior to importation.

We could also prompt to provide a different name for the account with
sid *-500 so the user doesn't need to break all file ownerships for the
conflicting account name.

Simo.

--
Simo Sorce
Samba Team GPL Compliance Officer <[hidden email]>
Principal Software Engineer at Red Hat, Inc. <[hidden email]>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: errors/issues when trying to migrate

ctryon
In reply to this post by Andrew Bartlett
On Sat, May 26, 2012 at 1:41 AM, Andrew Bartlett <[hidden email]> wrote:

> On Fri, 2012-05-25 at 16:43 +0200, Marc Muehlfeld wrote:
> > Hi,
> >
> > I'm playing in my test environment with a migration from s3 to the
> latest git
> > version. My s3 is in LDAP and I followed the HowTo.
> >
> > But I'm having the following issues/errors when running
> > # /usr/local/samba/bin/samba-tool domain samba3upgrade
> > --dbdir=/usr/var/locks3/ --use-xattrs=yes --realm=
> MUC.medizinische-genetik.de
> > /etc/samba/smb3.conf
> >
> >
> >
> >
> > 1.) tdb(/usr/var/locks3/gencache.tdb):Corrupt database: Record offset
> 696 has
> > incorrect hash
> > gencache_init: tdb_check(/usr/var/locks3/gencache.tdb) failed - retry
> after
> > truncate
> >
> > It's nothing serious. The script just continues.
>
> Indeed, gencache is only a cache, and therefore not required for
> migration.
>
> > 2.) Exporting groups
> > Ignoring group 'Print Operators' S-1-5-32-550 listed but then not found:
> > Unable to enumerate members for alias,
> (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> > Ignoring group 'Backup Operators' S-1-5-32-551 listed but then not found:
> > Unable to enumerate members for alias,
> (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> > Ignoring group 'Replicator' S-1-5-32-552 listed but then not found:
> Unable to
> > enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> > Ignoring group 'Administrators' S-1-5-32-544 listed but then not found:
> Unable
> > to enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> > Ignoring 'well known' group 'Guests' (should already be in AD, and have
> no
> > members)
> > Ignoring group 'Account Operators' S-1-5-32-548 listed but then not
> found:
> > Unable to enumerate members for alias,
> (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> > Ignoring group 'Server Operators' S-1-5-32-549 listed but then not found:
> > Unable to enumerate members for alias,
> (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> > Ignoring group 'Power Users' S-1-5-32-547 listed but then not found:
> Unable to
> > enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> > Ignoring group 'Users' S-1-5-32-545 listed but then not found: Unable to
> > enumerate members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
> >
> > The script continues, but this groups are all ignored. Any idea why?
>
> A number of Samba3 databases appear to have aliases templates for these
> well known groups, but if they are not mapped to system groups, then
> this will happen.  That's why we ignore the error, because clearly there
> are no users in these groups.
>
> > 3.) Importing WINS database
> > ERROR(<type 'exceptions.ValueError'>): uncaught exception - invalid
> literal
> > for int() with base 16: ''
> >    File
> >
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
> > line 160, in _run
> >      return self.run(*args, **kwargs)
> >    File
> > "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py",
> line
> > 926, in run
> >      useeadb=eadb)
> >    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
> > line 683, in upgrade_from_samba3
> >      samba3_winsdb = samba3.get_wins_db()
> >    File
> >
> "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
> > line 399, in get_wins_db
> >      return WinsDatabase(self.statedir_path("wins.dat"))
> >    File
> >
> "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
> > line 333, in __init__
> >      nb_flags = int(entries[i][:-1], 16)
> >
> > Here the script crashes and stops. The only way to continue, is to delete
> > wins.dat. Maybe the script can continue, if the WINS import failes.
>
> I need a sample of the failed wins.dat, so we can fix the parsing
> script.
>
> > 4.) Adding users to groups
> > ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception -
> > ProvisioningError: Could not add member
> > 'S-1-5-21-1362721961-1801182073-732966438-2996' to group
> > 'S-1-5-21-1362721961-1801182073-732966438-512' as either group or user
> record
> > doesn't exist: Unable to find GUID for DN
> >
> >    File
> >
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
> > line 160, in _run
> >      return self.run(*args, **kwargs)
> >    File
> > "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py",
> line
> > 926, in run
> >      useeadb=eadb)
> >    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
> > line 728, in upgrade_from_samba3
> >      add_users_to_group(result.samdb, g, groupmembers[str(g.sid)],
> logger)
> >    File
> "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
> > line 242, in add_users_to_group
> >      raise ProvisioningError("Could not add member '%s' to group '%s' as
> > either group or user record doesn't exist: %s" % (member_sid, group.sid,
> emsg))
> >
> > Here the script crash and stop again.
> > S-1-5-21-1362721961-1801182073-732966438-2996 in LDAP = Administrator
> > S-1-5-21-1362721961-1801182073-732966438-512 in LDAP = Group "Domain
> Admins"
> >
> > If I delete the user Administator from LDAP, the script run up to the
> end.
>
> The issue would be that Administrator should have a SID ending in -500.
> We already skip accounts "root" and "administrator" and map the password
> on to the Administrator account we build at provision time.  This does
> however mean that we break when trying to import the incorrect
> administrator as a group member.
>


Urk...  This could explain some long term problems we've been having with
our old S3 (3.0.9) system.  :-P  Another problem I'm seeing in our database
is a "nobody" user with a SID ending in *-501.  Our database has had a long
and tortuous journey over the years, and I'm not surprised to find various
accumulated crud in there.  I'm hoping that our S4 migration manages to
filter out some of that garbage...

I'm trying to use "pdbedit" to change the SID, but it fails, telling
me: Unable to modify TDB passwd ! Error: Record does not exist
(The record DOES show up if I do a "pdbedit -v -u administrator".)

<>? sudo smbpasswd -a Administrator
New SMB password:
Retype new SMB password:
Unable to modify TDB passwd ! Error: Record does not exist
 occured while storing the RID index (RID_000001f4)
Failed to modify entry for user Administrator.
Failed to modify password entry for user Administrator



In this case, I think we need to both more clearly detect this, and ask
> you to fix your database prior to importation.
>
> Andrew Bartlett
> --
> Andrew Bartlett                                http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
>
>


--
    Charles Tryon
_________________________________________________________________________
  “Risks are not to be evaluated in terms of the probability of success,
but in terms of the value of the goal.”
                - Ralph D. Winter
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: errors/issues when trying to migrate

Andrew Bartlett
On Tue, 2012-05-29 at 10:56 -0400, Charles Tryon wrote:

>
>
> On Sat, May 26, 2012 at 1:41 AM, Andrew Bartlett <[hidden email]>
> wrote:
>         On Fri, 2012-05-25 at 16:43 +0200, Marc Muehlfeld wrote:
>         > Hi,
>         >
>         > I'm playing in my test environment with a migration from s3
>         to the latest git
>         > version. My s3 is in LDAP and I followed the HowTo.
>         >
>         > But I'm having the following issues/errors when running
>         > # /usr/local/samba/bin/samba-tool domain samba3upgrade
>         > --dbdir=/usr/var/locks3/ --use-xattrs=yes
>         --realm=MUC.medizinische-genetik.de
>         > /etc/samba/smb3.conf
>         >
>         >
>         >
>         >
>         > 1.) tdb(/usr/var/locks3/gencache.tdb):Corrupt database:
>         Record offset 696 has
>         > incorrect hash
>         > gencache_init: tdb_check(/usr/var/locks3/gencache.tdb)
>         failed - retry after
>         > truncate
>         >
>         > It's nothing serious. The script just continues.
>        
>        
>         Indeed, gencache is only a cache, and therefore not required
>         for
>         migration.
>        
>         > 2.) Exporting groups
>         > Ignoring group 'Print Operators' S-1-5-32-550 listed but
>         then not found:
>         > Unable to enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         > Ignoring group 'Backup Operators' S-1-5-32-551 listed but
>         then not found:
>         > Unable to enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         > Ignoring group 'Replicator' S-1-5-32-552 listed but then not
>         found: Unable to
>         > enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         > Ignoring group 'Administrators' S-1-5-32-544 listed but then
>         not found: Unable
>         > to enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         > Ignoring 'well known' group 'Guests' (should already be in
>         AD, and have no
>         > members)
>         > Ignoring group 'Account Operators' S-1-5-32-548 listed but
>         then not found:
>         > Unable to enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         > Ignoring group 'Server Operators' S-1-5-32-549 listed but
>         then not found:
>         > Unable to enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         > Ignoring group 'Power Users' S-1-5-32-547 listed but then
>         not found: Unable to
>         > enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         > Ignoring group 'Users' S-1-5-32-545 listed but then not
>         found: Unable to
>         > enumerate members for alias,
>         (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>         >
>         > The script continues, but this groups are all ignored. Any
>         idea why?
>        
>        
>         A number of Samba3 databases appear to have aliases templates
>         for these
>         well known groups, but if they are not mapped to system
>         groups, then
>         this will happen.  That's why we ignore the error, because
>         clearly there
>         are no users in these groups.
>        
>         > 3.) Importing WINS database
>         > ERROR(<type 'exceptions.ValueError'>): uncaught exception -
>         invalid literal
>         > for int() with base 16: ''
>         >    File
>         >
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
>         > line 160, in _run
>         >      return self.run(*args, **kwargs)
>         >    File
>         >
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line
>         > 926, in run
>         >      useeadb=eadb)
>         >    File
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
>         > line 683, in upgrade_from_samba3
>         >      samba3_winsdb = samba3.get_wins_db()
>         >    File
>         >
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
>         > line 399, in get_wins_db
>         >      return WinsDatabase(self.statedir_path("wins.dat"))
>         >    File
>         >
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py",
>         > line 333, in __init__
>         >      nb_flags = int(entries[i][:-1], 16)
>         >
>         > Here the script crashes and stops. The only way to continue,
>         is to delete
>         > wins.dat. Maybe the script can continue, if the WINS import
>         failes.
>        
>        
>         I need a sample of the failed wins.dat, so we can fix the
>         parsing
>         script.
>        
>         > 4.) Adding users to groups
>         > ERROR(<class 'samba.provision.ProvisioningError'>): uncaught
>         exception -
>         > ProvisioningError: Could not add member
>         > 'S-1-5-21-1362721961-1801182073-732966438-2996' to group
>         > 'S-1-5-21-1362721961-1801182073-732966438-512' as either
>         group or user record
>         > doesn't exist: Unable to find GUID for DN
>         >
>         >    File
>         >
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py",
>         > line 160, in _run
>         >      return self.run(*args, **kwargs)
>         >    File
>         >
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line
>         > 926, in run
>         >      useeadb=eadb)
>         >    File
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
>         > line 728, in upgrade_from_samba3
>         >      add_users_to_group(result.samdb, g,
>         groupmembers[str(g.sid)], logger)
>         >    File
>         "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py",
>         > line 242, in add_users_to_group
>         >      raise ProvisioningError("Could not add member '%s' to
>         group '%s' as
>         > either group or user record doesn't exist: %s" %
>         (member_sid, group.sid, emsg))
>         >
>         > Here the script crash and stop again.
>         > S-1-5-21-1362721961-1801182073-732966438-2996 in LDAP =
>         Administrator
>         > S-1-5-21-1362721961-1801182073-732966438-512 in LDAP = Group
>         "Domain Admins"
>         >
>         > If I delete the user Administator from LDAP, the script run
>         up to the end.
>        
>        
>         The issue would be that Administrator should have a SID ending
>         in -500.
>         We already skip accounts "root" and "administrator" and map
>         the password
>         on to the Administrator account we build at provision time.
>          This does
>         however mean that we break when trying to import the incorrect
>         administrator as a group member.
>
>
>
>
> Urk...  This could explain some long term problems we've been having
> with our old S3 (3.0.9) system.  :-P  Another problem I'm seeing in
> our database is a "nobody" user with a SID ending in *-501.  Our
> database has had a long and tortuous journey over the years, and I'm
> not surprised to find various accumulated crud in there.  I'm hoping
> that our S4 migration manages to filter out some of that garbage...

Nobody being -501 is correct - it is the guest account, just as
root/administrator ideally should be -500.

Inspired by this thread, I'll see if I can improve the handling here, to
assert on a few more of these things.

Andrew Bartlett


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

Loading...