On Monday 14 January 2008 17:45:21 alois blasbichler wrote:
Hello list
We use openldap 2.3.39. I want to add with a perl-script to all my users this attributes : objectClass: orcluser orclpassword: xxxxxxxxx
I dont now how do that with a script. Actually my users haves this objectClasses : objectClass: top objectClass: hordePerson objectClass: shadowAccount objectClass: posixAccount objectClass: person objectClass: inetOrgPerson objectClass: SuSEeMailObject objectClass: sambaSamAccount
I defined an : objectclass ( 1.1.2.881.881.555.666 NAME 'inetorcluser' DESC 'inetorcluser' SUP ( inetOrgPerson $ orcluser ) STRUCTURAL )
Where is the definition for orcluser ? If it is AUXILIARY, or if you can make it auxiliary, then you can just add the two attributes in question, without changing the strucutural objectclass, and you could generated ldif such as this:
dn: uid=xxx,ou=yyy,dc=mydomain,dc=com changetype: modify add: objectclass objectclass: orcluser - add: orclpassword orclpassword: xyz
and use ldapmodify to apply these changes.
Or, do the equivalent mods directly with Net::LDAP.