I am trying to complete a poc which needs linux server to connect to MS AD and authenticate using domain creds. After some reference, I felt samba would do good here and so I have installed and configured samba on the linux server.

Whenever I do net ads join -U administrator, it throws the following error.

Host is not configured as a member server.
Invalid configuration.  Exiting....
Failed to join domain: This operation is only allowed for the PDC of the domain.

Please let me know where I am going wrong.

  • Which Samba version? 3 and 4 do differ significantly. Also, are you planning to provide file services on your Linux server or do you just need to access SMB shares of Windows Servers?
    – the-wabbit
    Sep 29, 2015 at 8:04
  • @the-wabbit: I just need to authenticate users based on our existing windows AD. Sep 29, 2015 at 10:12

1 Answer 1


Some month ago I tried to solve this problem - it was a nightmare... Yesterday, I started again to try to join Linux to the Domain Controller - and following the steps described here: http://koo.fi/blog/2015/06/16/ubuntu-14-04-active-directory-authentication/ worked perfectly. After those steps, Linux was able to authenticate all AD Users :-)

  • Thanks. But I am getting this error when I try to login as admin. kinit: Cannot find KDC for realm "<Domain>" while getting initial credentials Even I am not able to ping the domain, but I can ping the internal ip of DC. What might be the issue.? Sep 30, 2015 at 10:17
  • @serverstackqns this sounds like your /etc/krb5.conf is not matching your environment. You should add some information about your domain and configuration to the question.
    – the-wabbit
    Sep 30, 2015 at 10:31
  • @serverstackqns: I followed the linked description (including the prerequisites setting dns & time source) and the described sssd installation did everything: most config-files were automagically changed and I had just to change the descibed files manually. I tried to fix the problems of my old machine, but after 1 or 2 days I started with a new installation - and it was done in 1 or 2 hours :-)
    – Tom
    Sep 30, 2015 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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