Results 1 to 5 of 5

Thread: setting mobile phone number with cli

  1. #1
    rwa
    rwa is offline Junior Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    7

    Default setting mobile phone number with cli

    I'm trying to set a user's mobile phone number via zmprov, but it doesn't seem to be allowed. This post would suggest it is possible:

    how to import contacts by cli?

    But all variations of the attribute name I try fail with one error or another:

    Code:
    zimbra@zimbra:/opt/zimbra/bin$ /opt/zimbra/bin/zmprov ma user@domain.com mobileTelephoneNumber '111-222-3333'
    ERROR: service.INVALID_REQUEST (invalid request: LDAP schema violation: [LDAP: error code 65 - attribute 'mobile' not allowed])
    zimbra@zimbra:/opt/zimbra/bin$ /opt/zimbra/bin/zmprov ma user@domain.com mobile '111-222-3333'
    ERROR: service.INVALID_REQUEST (invalid request: LDAP schema violation: [LDAP: error code 65 - attribute 'mobile' not allowed])
    zimbra@zimbra:/opt/zimbra/bin$ /opt/zimbra/bin/zmprov ma user@domain.com zimbraMobilePhone '111-222-3333'
    ERROR: account.INVALID_ATTR_NAME (invalid attr name: [LDAP: error code 17 - zimbraMobilePhone: attribute type undefined])
    zimbra@zimbra:/opt/zimbra/bin$ /opt/zimbra/bin/zmprov ma user@domain.com mobilePhone '111-222-3333'
    ERROR: account.INVALID_ATTR_NAME (invalid attr name: [LDAP: error code 17 - mobilePhone: attribute type undefined])
    zimbra@zimbra:/opt/zimbra/bin$ /opt/zimbra/bin/zmprov ma user@domain.com telephoneNumber '111-222-3333'
    zimbra@zimbra:/opt/zimbra/bin$
    From the errors it seems like 'mobile' and 'mobileTelephoneNumber' are defined but not allowed. Is there some way to set these?

    Thanks.

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    You could query the LDAP schema to find what the actual name is ?

  3. #3
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    On the LDAP side we currently don't have the 'mobile' (and 'mobileTelephoneNumber') attribute fully included in account objects (hence the varying schema errors you're seeing.) It's there in the rough so to speak, and not mapped to mobilePhone yet either; checkout /opt/zimbra/openldap/etc/openldap/schema/cosine.schema.

    Vote for Bug 32294 - Add mobilePhone field to GAL.

    There is 'telephoneNumber', which is currently linked to 'workPhone' in GAL address books.

    If you're trying to modify the phone number displayed in the GAL for someone:
    zmprov ma user@domain.com telephoneNumber 555-123-4321

    If you want to modify an individual contact see 'zmmailbox help contact' for more info on modifyContactAttrs. With SOAP it's ModifyContactRequest, you could even use the zmsoap command via CLI.
    Last edited by mmorse; 12-09-2008 at 11:43 AM.

  4. #4
    rwa
    rwa is offline Junior Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    7

    Default

    Sorry, I should have spelled out what I tried there. It seems to be defined in cosine.schema:

    Code:
    # 9.3.31.  Mobile Telephone Number
    #
    #  The Mobile Telephone Number attribute type specifies a mobile
    #  telephone number associated with a person.  Attribute values should
    #  follow the agreed format for international telephone numbers: i.e.,
    #  "+44 71 123 4567".
    #
    #    mobileTelephoneNumber ATTRIBUTE
    #        WITH ATTRIBUTE-SYNTAX
    #            telephoneNumberSyntax
    #    ::= {pilotAttributeType 41}
    #  
    attributetype ( 0.9.2342.19200300.100.1.41
            NAME ( 'mobile' 'mobileTelephoneNumber' )
            DESC 'RFC1274: mobile telephone number'
            EQUALITY telephoneNumberMatch
            SUBSTR telephoneNumberSubstringsMatch
            SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )
    and that is included in slapd.conf:

    Code:
    cat /opt/zimbra/openldap/etc/openldap/slapd.conf | grep cosine
    include         "/opt/zimbra/openldap/etc/openldap/schema/cosine.schema"
    Can you tell me how to query the running ldap server for its loaded schema (this is running on ubuntu 8.0.4). From the above I was guessing the proper term was 'mobile' or 'mobileTelephoneNumber'

    Thanks.

  5. #5
    rwa
    rwa is offline Junior Member
    Join Date
    Jul 2008
    Posts
    5
    Rep Power
    7

    Default

    OK, thank you. I was trying to add this to the GAL and had been able to use telephoneNumber for the work phone but not set a mobile number. The bug explains it, and I will vote for it.

    Thanks again.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Installation with a configuration file problems...
    By smurraysb in forum Installation
    Replies: 4
    Last Post: 04-16-2008, 11:22 PM
  2. [SOLVED] Install Problem in Ubuntu 6.06 Server
    By xtimox in forum Installation
    Replies: 16
    Last Post: 03-27-2008, 09:36 AM
  3. Replies: 7
    Last Post: 02-27-2008, 05:17 PM
  4. Shared Folder
    By drdre in forum Administrators
    Replies: 20
    Last Post: 01-20-2008, 01:07 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
  •