Results 1 to 6 of 6

Thread: Add Description, First / Last / Display Names using command line?

  1. #1
    Join Date
    Oct 2005
    Posts
    2
    Rep Power
    0

    Default Add Description, First / Last / Display Names using command line?

    We're bulk loading users into our Zimbra system from a text file. I've gone through the admin manual, but can't find any reference to add a "Description" field using zmprov.

    Is there a way to add the Firstname / Lastname / Display name fields using zmprov (or some other command-line tool)?
    Last edited by sean.mccorkell; 09-18-2006 at 01:01 PM.

  2. #2
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    thanks. If you want to see a list of all the valid attributes on an account, take a look at the following file:

    Code:
    /opt/zimbra/openldap/etc/openldap/schema/zimbra.schema
    Look for "objectclass ( zimbraAccount". And it will show you all the valid attribute names.

    An easier approach might be to use the GUI admin to set all the fields you are interested on a particular account, then look at the account with zmprov:

    Code:
    /opt/zimbra/bin/zmprov ga account@your.domain
    that will show you all the attribute names, you are interested, like:

    Code:
    description: some description
    givenName: John
    sn: Smith
    ...
    The attributes like givenName and sn come from LDAP, so don't blame us fo the name

    you can then write a script that calls zmprov modifyAccount on whatever accounts you want:

    Code:
    zmprov ma account2@your.domain description "some description" sn Jones
    hope that helps...

    roland

  3. #3
    Join Date
    Oct 2005
    Posts
    2
    Rep Power
    0

    Default

    Roland,

    Thanks for the quick reply.

    That was very helpful - I didn't realize that we could use "zmprov ma" to add LDAP attributes - I'd already figured out how to view the attributes using "zmprov ga"...

    I've realized this be taken a step further, like "zmprov ca student@mail.org somepassword description somedescription sn somesn etc" to populate everything during account creation...although I received an error for the givenName field:

    WARN: checkValue: no attribute info for: givenName

    Thanks again for your help.....
    Last edited by sean.mccorkell; 01-18-2006 at 08:00 AM.

  4. #4
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    Yeah, zmprov is just manipulating LDAP attributes.

    The "WARN: *" message is just that, a warning message. We do some sanity checking on the server before sending requests to LDAP, and it looks like we accidently added "gn" instead of "givenName" to our list of attributes to check (gn is an allowed alias for givenName on input, but on output the LDAP server always send givenName).

    The value should still have been updated. I'll make sure we check for "givenName" in the next release...

    thanks, roland

  5. #5
    Join Date
    Sep 2005
    Posts
    95
    Rep Power
    10

    Default

    hey, just curious can I use zmprov to add other attribute not in zimbraAccount object?

  6. #6
    Join Date
    Aug 2005
    Posts
    228
    Rep Power
    10

    Default

    LDAP schema checking will only allow attributes that are valid for entries object class(es) to be set.

    roland

Similar Threads

  1. Zimbra + Samba LDAP, cannot add winxp
    By fajarpri in forum Installation
    Replies: 4
    Last Post: 07-08-2007, 12:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •