1. Choose Apple menu > System Preferences, click Users & Groups.

  2. Click Login Options.

  3. Click the lock icon  to unlock it, then enter an administrator name and password.

  4. Click the button next to Network Account Server.

    The button is labeled Join if you haven’t already connected to a network account server. It’s labeled Edit if you already have an existing connection.

  5. If you clicked Edit, click Add .

  6. Enter the fully qualified domain name of a network account server in the Server field, or choose one from the Server pop-up list.

  7. To add another server connection, click Add , then repeat steps 3 and 4.

  8. Click OK.

If your computer name contains a hyphen (-), you might not be able to join a network account server. To check your computer name, and change it if necessary, use Sharing preferences.

Choose Apple menu > System Preferences, then click Sharing.

Reference: Apple.com