openldap pwmUser objectclass???

866 views
Skip to first unread message

ty...@beloit.edu

unread,
Mar 14, 2013, 4:09:31 PM3/14/13
to pwm-g...@googlegroups.com
I am confused. I successfully added the pwm.schema to my ldap which was basciallly an auxiliary schema definiing the pwmUser attributes for openldap.

But when I go to add the ojectclass pwmUser to an account in ldap from a ldif file, I get the following error:

[root@testldap sample_ldifs]# ldapmodify -x -D "cn=Manager,dc=beloit,dc=edu" -W -f ./pwm.ldif
Enter LDAP Password:
adding new entry "uid=johnson,ou=People,dc=beloit,dc=edu"
ldap_add: Object class violation (65)
additional info: no structural object class provided

Below is the ldif content:
[root@testldap sample_ldifs]# more pwm.ldif
dn: uid=tyler,ou=People,dc=beloit,dc=edu
changetype: add
objectClass: pwmUser


So the question is do I need some structrual schema as a prerequisite?

How do I add the pwm object class to an openldap account given I already have the schema loaded? I am running 2.4 version of openldap.
Tim

Menno Pieters

unread,
Mar 14, 2013, 4:27:01 PM3/14/13
to pwm-g...@googlegroups.com
On Thu, Mar 14, 2013 at 9:09 PM, <ty...@beloit.edu> wrote:
   I am confused.  I successfully added the pwm.schema to my ldap which was basciallly an auxiliary schema definiing the pwmUser attributes for openldap.

   But when I go to add the ojectclass pwmUser to an account in ldap from a ldif file, I get the following error:

[root@testldap sample_ldifs]# ldapmodify -x -D "cn=Manager,dc=beloit,dc=edu" -W -f ./pwm.ldif
Enter LDAP Password:
adding new entry "uid=johnson,ou=People,dc=beloit,dc=edu"
ldap_add: Object class violation (65)
        additional info: no structural object class provided

Below is the ldif content:
[root@testldap sample_ldifs]# more pwm.ldif
dn: uid=tyler,ou=People,dc=beloit,dc=edu
changetype: add
objectClass: pwmUser


So the question is do I need some structrual schema as a prerequisite?

An auxiliary class cannot be the only class an object is based upon. You need something like "person" or "inetOrgPerson".

The ldif you presented will not add the class to an existing user, but add a new object (or try to). If you just want to add the class, use "changeType: modify":

dn: uid=tyler,ou=People,dc=beloit,dc=edu
changetype: modify
add: objectClass
objectClass: pwmUser
-

How do I add the pwm object class to an openldap account given I already have the schema loaded?  I am running 2.4 version of openldap.

This is actually more of an OpenLDAP question than a PWM question... I could recommend using an LDAP client like Apache Directory Studio or LdapBrowser to browse and update your LDAP. Moreover, if you allow PWM to do so, it can automagically add the class to users, but that would require you to set permissions, which is a bit more difficult than adding an object class....

Regards,

Menno

Tim Tyler

unread,
Mar 14, 2013, 5:25:22 PM3/14/13
to pwm-g...@googlegroups.com

Menno,

Thanks for the reminder.  It has been a while since I have added an object class via ldif.  That worked perfect.  Thanks!

Tim

--
You received this message because you are subscribed to a topic in the Google Groups "pwm-general" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pwm-general/rtLC2Hq-uG4/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to pwm-general...@googlegroups.com.
To post to this group, send email to pwm-g...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages