setting mobile phone number with cli

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
rwa
Posts: 5
Joined: Fri Sep 12, 2014 11:39 pm

setting mobile phone number with cli

Post by rwa »

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:

But">http://www.zimbra.com/forums/administra ... s-cli.html
But all variations of the attribute name I try fail with one error or another:
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.
uxbod
Ambassador
Ambassador
Posts: 7811
Joined: Fri Sep 12, 2014 10:21 pm

setting mobile phone number with cli

Post by uxbod »

You could query the LDAP schema to find what the actual name is ?
mmorse
Ambassador
Ambassador
Posts: 6036
Joined: Fri Sep 12, 2014 10:24 pm

setting mobile phone number with cli

Post by mmorse »

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">http://bugzilla.zimbra.com/show_bug.cgi?id=32294>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.
rwa
Posts: 5
Joined: Fri Sep 12, 2014 11:39 pm

setting mobile phone number with cli

Post by rwa »

Sorry, I should have spelled out what I tried there. It seems to be defined in cosine.schema:
# 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:
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.
rwa
Posts: 5
Joined: Fri Sep 12, 2014 11:39 pm

setting mobile phone number with cli

Post by rwa »

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.
Post Reply