Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-2010, 01:10 AM
Loyal Member
 
Posts: 92
Default Add objectClass with ldapmodify

Hi again.

I want to add a new objectClass inside of a ou and it requires to used a new attribute with out exceptions:


Before:
Code:
# people, zimbracorreo.com
dn: ou=people,dc=zimbracorreo,dc=com
ou: people
objectClass: organizationalRole
cn: people
After:

Code:
# people, zimbracorreo.com
dn: ou=people,dc=zimbracorreo,dc=com
ou: people
objectClass: organizationalRole
objectClass: myObjectClass

IdOur: 1245   (new attributo requires with myObjectClass)
cn: people

I'm trying with ldapmodify but I'm wrong:

Code:
  1 dn: ou=people,dc=zimbracorreo,dc=com
  2 changetype: modify
  3 
  4 objectClass: myObjectClass
  5 idOur:1245
Anyones know what is happened ?

Thanks so much!
Reply With Quote
  #2 (permalink)  
Old 10-22-2010, 01:36 AM
Special Member
 
Posts: 113
Default

Do it with zmprov

Code:
zmprov ma <account> +objectClass myObjectClass +idOur 1245
To do it on all accounts

Code:
zmprov -l gaa > /tmp/1
for i in $(cat /tmp/1); do echo ma $i +objectClass myObjectClass +idOur 1245; done > /tmp/2
zmprov < /tmp/2
rm -f /tmp/1 /tmp/1
Reply With Quote
  #3 (permalink)  
Old 10-22-2010, 01:46 AM
Loyal Member
 
Posts: 92
Default

zmprov ma 0123456N@zimbra.com +objectClass myObjectClass +idOur 1245
ERROR: service.INVALID_REQUEST (invalid request: LDAP schema violation: [LDAP: error code 65 - invalid structural object class chain (organizationalPerson/myObjectClass)])


this object class is an schema that it calls: MySchema.ldif, this schema is complete add, because i can create new entries with this object class but i can't modify the other parts of the tree
Reply With Quote
  #4 (permalink)  
Old 10-22-2010, 02:43 AM
Special Member
 
Posts: 113
Default

Can you post your MySchema.ldif? What Zimbra Version do you use?
Reply With Quote
  #5 (permalink)  
Old 10-22-2010, 03:15 AM
Loyal Member
 
Posts: 92
Default

Code:
dn: cn={13}myObjectClass
objectClass: olcSchemaConfig
cn: {13}myObjectClass
olcAttributeTypes: {0}( 2.3.3.3.5.4 NAME 'nombre' EQUALITY caseIgnoreMatch SUB
 STR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{30} )
olcAttributeTypes: {1}( 2.3.3.3.5.5 NAME 'autor' EQUALITY caseIgnoreMatch SUBS
 TR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{50} )
olcAttributeTypes: {2}( 2.3.3.3.5.6 NAME 'fechaImplantacion' EQUALITY caseIgno
 reMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
 {10} )
olcAttributeTypes: {3}( 2.3.3.3.5.7 NAME 'descripcion' EQUALITY caseIgnoreMatc
 h SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{50} )
olcAttributeTypes: {4}( 2.3.3.3.5.8 NAME 'uri' EQUALITY caseIgnoreMatch SUBSTR
  caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{50} )
olcAttributeTypes: {5}( 2.3.3.3.5.9 NAME 'plataforma' EQUALITY caseIgnoreMatch
  SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{50} )
olcAttributeTypes: {6}( 2.3.3.3.5.10 NAME 'version' EQUALITY caseIgnoreMatch S
 UBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{20} )
olcAttributeTypes: {7}( 2.3.3.3.5.11 NAME 'tipo' EQUALITY caseIgnoreMatch SUBS
 TR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{10} )
olcAttributeTypes: {8}( 2.3.3.3.5.12 NAME 'usuario' EQUALITY caseExactIA5Match
  SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
olcAttributeTypes: {9}( 2.3.3.3.5.13 NAME 'administrador' EQUALITY caseExactIA
 5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.2
 6 )
olcObjectClasses: {0}( 2.3.3.3.6.1 NAME 'myObjectClass' SUP top STRUCT
 URAL MUST nombre MAY ( autor $ fechaImplantacion $ descripcion $ uri $ plataf
 orma $ version $ tipo ) )
structuralObjectClass: olcSchemaConfig
entryUUID: 91fcca52-33a4-4bd6-84c9-ab4ba9d566a1
creatorsName: cn=config
createTimestamp: 20101021132838Z
entryCSN: 20101021132838.500325Z#000000#000#000000
modifiersName: cn=config
modifyTimestamp: 20101021132838Z
)

I'm using 6.6 Open Source Edition
Reply With Quote
  #6 (permalink)  
Old 10-22-2010, 03:29 AM
Special Member
 
Posts: 113
Default

A LDAP object can only have one structal object class. If you want to use your object class with Zimbra, you have to change the type to AUXILIARY.

See Chapter 3 LDAP Schemas, ObjectClasses and Attributes
Reply With Quote
  #7 (permalink)  
Old 10-22-2010, 04:24 AM
Loyal Member
 
Posts: 92
Default

all theses changes will be safe when I update Zimbra to a new version?

and the last question:
How can integer when Im going to create a new users include the new objectClass by default???

thanks so much!

Last edited by mnbvmnbv; 10-22-2010 at 05:27 AM..
Reply With Quote
  #8 (permalink)  
Old 10-22-2010, 05:36 AM
Special Member
 
Posts: 113
Default

Quote:
Originally Posted by mnbvmnbv View Post
all theses changes will be safe when I update Zimbra to a new version?
Yes, I think so, because nothing it's mentioned about a upgrade problem at Installing custom ldap schema 6.0 - Zimbra :: Wiki. But I'm not sure.

Quote:
Originally Posted by mnbvmnbv View Post
How can integer when Im going to create a new users include the new objectClass by default???
You can add the object class to every new account with this command.
Code:
zmprov mcf +zimbraAccountExtraObjectClass myObjectClass
But take care about setting the must-have attribute nombre for your object class. Maybe with a Zimlet or with zmprov.
Reply With Quote
  #9 (permalink)  
Old 12-20-2010, 01:05 AM
Loyal Member
 
Posts: 92
Default

Quote:
Originally Posted by jummo View Post

You can add the object class to every new account with this command.
Code:
zmprov mcf +zimbraAccountExtraObjectClass myObjectClass
But take care about setting the must-have attribute nombre for your object class. Maybe with a Zimlet or with zmprov.

Thanks, my another question is its is possible to add an objectClass and some attributes have default value for new each account.

In samba, i need this objectclass

Code:
objectclass ( 1.3.6.1.4.1.7165.2.2.6 NAME 'sambaSamAccount' SUP top AUXILIARY
	DESC 'Samba 3.0 Auxilary SAM Account'
	MUST ( uid $ sambaSID )
	MAY  ( cn $ sambaLMPassword $ sambaNTPassword $ sambaPwdLastSet $
	       sambaLogonTime $ sambaLogoffTime $ sambaKickoffTime $
	       sambaPwdCanChange $ sambaPwdMustChange $ sambaAcctFlags $
               displayName $ sambaHomePath $ sambaHomeDrive $ sambaLogonScript $
	       sambaProfilePath $ description $ sambaUserWorkstations $
	       sambaPrimaryGroupSID $ sambaDomainName $ sambaMungedDial $
	       sambaBadPasswordCount $ sambaBadPasswordTime $
	       sambaPasswordHistory $ sambaLogonHours))
and use some attributes, but i have to add the MUST attributes and i dont want to use the zmprov. Is it possible???

Thanks in Advanced
Reply With Quote
  #10 (permalink)  
Old 01-21-2011, 04:43 AM
Loyal Member
 
Posts: 92
Default

Quote:
Originally Posted by jummo View Post
Yes, I think so, because nothing it's mentioned about a upgrade problem at Installing custom ldap schema 6.0 - Zimbra :: Wiki. But I'm not sure.



You can add the object class to every new account with this command.
Code:
zmprov mcf +zimbraAccountExtraObjectClass myObjectClass
But take care about setting the must-have attribute nombre for your object class. Maybe with a Zimlet or with zmprov.

Is possible to assing some Object class for specific domains and for other domains not add this object class???

Thanks!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.