I'm trying to add a group with 2 users to LDAP, but i'm running into problems. When I add my group and then search for it, it shows a userPassword, and garbles the memberUid of the first user I added to the group. Any ideas?
testgroup.ldif:
dn: cn=testgroup,ou=Group,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us objectClass: posixGroup objectClass: top cn: testgroup userPassword: {crypt}x gidNumber: 102 memberUid: adam memberUid: testuser
ldapadd -D "cn=Manager,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us" -w txxxxxxxx -x -v -f testgroup.ldif ldap_initialize( <DEFAULT> ) add objectClass: posixGroup top add cn: testgroup add userPassword: {crypt}x add gidNumber: 102 add memberUid: adam testuser adding new entry "cn=testgroup,ou=Group,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us" modify complete
ldapsearch -D 'cn=Manager,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us' -b "cn=testgroup,ou=Group,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us" -w tical123 -x # extended LDIF # # LDAPv3 # base <cn=testgroup,ou=Group,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# testgroup, Group, gomer.mdah.state.ms.us dn: cn=testgroup,ou=Group,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us objectClass: posixGroup objectClass: top cn: testgroup userPassword:: e2NyeXB0fXg= gidNumber: 102 memberUid:: YWRhbSA= memberUid: testuser
# search result search: 2 result: 0 Success
# numResponses: 2 # numEntries: 1
Adam Williams wrote:
I'm trying to add a group with 2 users to LDAP, but i'm running into problems. When I add my group and then search for it, it shows a userPassword,
What are your ACLs? If they allow reading the userPassword attribute for groups, you'll see the values as expected.
and garbles the memberUid of the first user I added to the group. Any ideas?
See RFC 2849. Base64 encoding isn't garbling. It's very common for data to be Base64 encoded when output as LDIF. The specific criteria is unclear (to me), but you can expect some text fields to be encoded. Look for the double colons (::) after the attribute name to indicate that it's encoded.
Boy was I confused for a second. At least one Adam Williams knows this all well I'm sure;)
Jon Roberts www.mentata.com
Jon Roberts wrote:
Adam Williams wrote:
I'm trying to add a group with 2 users to LDAP, but i'm running into problems. When I add my group and then search for it, it shows a userPassword,
What are your ACLs? If they allow reading the userPassword attribute for groups, you'll see the values as expected.
and garbles the memberUid of the first user I added to the group. Any ideas?
See RFC 2849. Base64 encoding isn't garbling. It's very common for data to be Base64 encoded when output as LDIF. The specific criteria is unclear (to me), but you can expect some text fields to be encoded. Look for the double colons (::) after the attribute name to indicate that it's encoded.
The only reason for base64 encoding in the example the original poster sent is that there must have been trailing whitespace on one of the input values.
On Thu, Jul 19, 2007 at 08:24:08AM -0500, Adam Williams wrote:
I'm trying to add a group with 2 users to LDAP, but i'm running into problems. When I add my group and then search for it, it shows a userPassword, and garbles the memberUid of the first user I added to the group. Any ideas? userPassword: {crypt}x
<snip>
ldapsearch -D 'cn=Manager,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us' -b "cn=testgroup,ou=Group,dc=gomer,dc=mdah,dc=state,dc=ms,dc=us" -w tical123 -x userPassword:: e2NyeXB0fXg=
[todd@tlyons ~/git/IV]$ echo "e2NyeXB0fXg=" | mimencode -u ; echo {crypt}x
openldap-software@openldap.org