LDB questions

Kai Blin kai at samba.org
Wed Feb 13 10:36:33 GMT 2008


On Wednesday 13 February 2008 00:57:53 Kai Blin wrote:

> For the first uid I try to map to a SID this works, the next one fails.
> What am I doing wrong? Is there a better way to do this?

Turns out that if I return the ldb_errstring() for this, it claims that a 
record that doesn't seem to be in the database already exists. Like this:

Adding a new record failed: Entry objectSid=S-1-22-1-1002 already exists

opening the ldb in ldbedit shows that my database looks like this:
# editing 2 records
# record 1
dn: objectSid=S-1-22-1-1001
uidNumber: 1000
objectSid: S-1-22-1-1001
distinguishedName: objectSid=S-1-22-1-1001

# record 2
dn: @BASEINFO
sequenceNumber: 2
whenChanged: 20080213103223.0Z
distinguishedName: @BASEINFO

so obviously there's no Entry objectSid=S-1-22-1-1002 that already exists.

The thing that's really confusing the heck out of me is that I can add two 
objectSid entries, provided one is a local unix user where the mapping is 
created in my uid_to_sid function, and the other is created from my 
sid_to_uid function. However, both functions only work once.

Any clues?
Kai


-- 
Kai Blin
WorldForge developer  http://www.worldforge.org/
Wine developer        http://wiki.winehq.org/KaiBlin
Samba team member     http://www.samba.org/samba/team/
--
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.samba.org/archive/samba-technical/attachments/20080213/3ec8aecf/attachment.bin


More information about the samba-technical mailing list