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 12-09-2008, 07:56 AM
rwa rwa is offline
Junior Member
 
Posts: 5
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.
Reply With Quote
  #2 (permalink)  
Old 12-09-2008, 08:34 AM
Moderator
 
Posts: 7,928
Default

You could query the LDAP schema to find what the actual name is ?
__________________
Reply With Quote
  #3 (permalink)  
Old 12-09-2008, 08:46 AM
Moderator
 
Posts: 6,237
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 10:43 AM..
Reply With Quote
  #4 (permalink)  
Old 12-09-2008, 08:46 AM
rwa rwa is offline
Junior Member
 
Posts: 5
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.
Reply With Quote
  #5 (permalink)  
Old 12-09-2008, 08:49 AM
rwa rwa is offline
Junior Member
 
Posts: 5
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.
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.