Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The company I work for is running OS X Server 10.6. All of the users were created with a first.last username syntax. This is causing problems and so we are trying to change the usernames to firstlast without deleting and recreating all of the user accounts. I found the following example command:

serveradmin$ ldapmodrdn -U diradmin -Y “cram-md5″ -W -r “uid=first.last,cn=users,dc=my,dc=domain,dc=com” “uid=firstlast”

Here is the result:

Enter LDAP Password: 
SASL/CRAM-MD5 authentication started
SASL username: diradmin
Rename Result: Invalid DN syntax (34)
Additional info: invalid DN


Does anyone know of a way to rename my users in a non-destructive way? Can anyone tell me how to solve the Invalid DN syntax problem? Any help is much appreciated.

share|improve this question
up vote 0 down vote accepted

You need to use dscl command to change a short name and there is not only one occurrence in the OD record. Check this link for sample:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.