Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

OD Uses can't log into Server after name change

HI,


I needed to change the DNS Name of my Server.


After I change the name, only the 501 user is able to log in.


Looking at the logs, I see that OD seems to be trying to access resources based on the old name:

Server not found in database: krbtgt/HOME.ORG@NS.HOME.ORG: no such entry found in hdb

Failed building TGS-REP to 127.0.0.1:49394

TGS-REQ james@NS.HOME.ORG from 127.0.0.1:54923 for ldap/mail.home.org@NS.HOME.ORG [forwardable]

Server not found in database: ldap/mail.home.org@NS.HOME.ORG: no such entry found in hdb

Failed building TGS-REP to 127.0.0.1:54923

GSSAPI Error: Miscellaneous failure (see text (Server (ldap/mail.home.org@NS.HOME.ORG) unknown while looking up 'ldap/mail.home.org@NS.HOME.ORG' (cached result, timeout in 1200 sec))

error: PAM: authentication error for james from localhost via ::1


So, it seems like OD got broken by the name change. Using WorkGroup manager I was able export the accounts. (there are only 3 of them).


Is there a way to fix this?
If not, is there a way to recreate the OD Direcotry, but still restore the user info?


thanks

James

OS X Server-OTHER, OS X Mavericks (10.9.5), null

Posted on Mar 21, 2015 1:38 AM

Reply
2 replies

Mar 21, 2015 6:27 AM in response to james968

Many Open Directory problems can be resolved by taking the following steps. Test after each one, and back up all data before making any changes.

1. The OD master must have a static IP address on the local network, not a dynamic address. It must not be connected to the same network with more than one interface; e.g., Ethernet and Wi-Fi.

2. You must have a working DNS service, and the server's hostname must match its fully-qualified domain name. To confirm, select the server by name in the sidebar of the Server application window, then select the Overview tab. Click the Edit button on the Host Name line. On the Accessing your Server sheet, Domain Name should be selected. Change the Host Name, if necessary. The server must have at least a three-level name (e.g. "server.yourdomain.com"), and the name must not be in the ".local" top-level domain, which is reserved for Bonjour.

3. The primary DNS server used by the server must be itself, unless you're using another server for internal DNS. The only DNS server set on the clients should be the internal one, which they should get from DHCP if applicable.

4. If you have accounts with network home directories, make sure the URL's are correct in the user settings. A return status of 45 from the authorizationhost daemon in the log may mean that the URL for mounting the home directory was not updated after a change in the hostname. If the server and clients are all running OS X 10.10 or later, directories should be shared with SMB rather than AFP.

5. Only if you're still running Mavericks server, follow these instructions to rebuild the Kerberos configuration on the server.

6. If you use authenticated binding, check the validity of the master's certificate. The common name must match the hostname and domain name. Deselecting and then reselecting the certificate in Server.app has been reported to have an effect in some cases. Otherwise delete all certificates and create new ones.

7. Unbind and then rebind the clients in the Users & Groups preference pane. Use the fully-qualified domain name of the master.

8. Reboot the master and the clients.

9. Don't log in to the server with a network user's account.

10. Disable any internal firewalls in use, including third-party "security" software.

11. If you've created any replica servers, delete them.

12. If OD has only recently stopped working when it was working before, you may be able to restore it from the automatic backup in /var/db/backups, or from a Time Machine snapshot of that backup.

13. Reset the password policy database:

sudo pwpolicy -clearaccountpolicies

14. As a last resort, export all OD users. In the Open Directory pane of Server, delete the OD server. Then recreate it and import the users. Ensure that the UID's are in the 1001+ range.

If you get this far without solving the problem, then you'll need to examine the logs in the Open Directory section of the log list in the Server app, and also the system log on the clients.

Mar 22, 2015 5:09 AM in response to james968

Which OS X Server version do you have?

How did you change the DNS name for your server?


I am not sure what you mean with "If not, is there a way to recreate the OD Direcotry, but still restore the user info?"

If you only need to use the existing home folders of your user, you can do so by following these steps.

This will keep all files and settings the users made within their network accounts.


First of all I suggest to mv the home folders to an archive folder so they won´t accidentally get overwritten.

You can do so in terminal by typing:

sudo mkdir /Users/archive

sudo mv /Users/* /Users/archive

You might have to adjust the path to whatever path your home folders are stored in.


After creating the new accounts in OD you need to go to Terminal and remove the newly created home folders and restore the archived home folders to their original location.

Check ownership of the home folders with 'ls -l /Users'

If this does not fit you must chown -R the home folders to the corresponding user names e. g.

sudo chmod -R user1 /Users/user1


If you don´t use the exact same user names as you had before you might even have to rename the home folders.


HTH

Greetings

Martin

OD Uses can't log into Server after name change

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.