1

I am trying to populate some samba values in my LDAP based on some user information. Among other things, I have to create a 'sambaSID' for a user. It is composed of two values: the prefix which is the sambaSID of a sambaDomainName object and the suffix which is 1000 + (2* uid) oder the user.

I can see the sambaSID attribute from my sambaDomainName using ldapsearch like so:

ldapsearch -x  -D {adminUser} -W -H ldap://...:389 -b $base -s sub "sambaDomainName=TRON" sambaSID

the adminUser and base are correctly provided.

Now, if I try to do the same in Java using Spring LDAP, I see all the attributes except for the SambaSID. The same behaviour happens for a LDAP group object, from which I also need the SambaSID.

As I can read any other property, I believe there is something special about the SambaSID.

Does anyone have any ideas?

Thanks in advance! DodoFXP

1
  • Please post your code to show how you "try to do the same in Java using Spring LDAP". Commented Jan 6, 2014 at 7:05

1 Answer 1

1

I solved the issue:

I am using spring-ldap, creating a LdapContextSource, configuring it with a principal and password and then passing it to a LdapTemplate.

The LdapTemplate does not use .getReadWriteContext() which performs the authentication. Hence, I was using anonymous access. When doing operation on the DirContext returned by getReadWriteContext() I get all attributes.

Plus, the authentication has been reenabled on the LDAP so anonymous shows even less attributes now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.