Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I'm attempting to join a Ubuntu 12.04 server to Active Directory. I installed samba, and kb5-user, created a machine account in AD, and did:

> net ads testjoin
Join is OK

So far so good. Then I hit a problem:

> sudo net join -U myuser
Failed to join domain: failed to set machine spn: Constraint violation

I do not have access to modify anything on the Active Directory server as I'm not admin. Is there any way around this error?

share|improve this question
Silly question - does myuser have permissions to join machines to the domain? Also, what Windows version? – growse May 16 '12 at 9:55
The machine account is already created, and the user is set as owner of the machine account – Jon Skarpeteig May 16 '12 at 10:07
Every time I've done a winbind Ubuntu AD join, the process creates the machine account in the AD for me. Honestly, I didn't think it'd work if you already have the machine account created, but can't say for sure that this is what's wrong here. – growse May 16 '12 at 10:59
To create the machine account in AD using winbind requires administrative privileges, which I do not have. – Jon Skarpeteig May 16 '12 at 11:32
up vote 2 down vote accepted

I also ran in to the same issue winbindd simply would not start. The entry was already in /etc/hosts but I needed to change /etc/nsswitch.conf and changed to order so that 'files' came first.

hosts: mdns4_minimal files nis dns mdns4 myhostname


hosts: files mdns4_minimal nis dns mdns4 myhostname

share|improve this answer

I was able to solve this by adding a DNS entry for the host prior to attempting to join

share|improve this answer
Can you be more explicit, where did you had to create a DNS entry. The default domain of your computer happened to match the one of the AD. What if it doesn't? – sorin Jul 29 '14 at 10:09

Ran in to the same issue... Needed to add an entry into /etc/hosts.

So the first entry needs to be the IP, the 2nd must be the fully qualified domain name for the domain you are joining, and the rest can be in any order.

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.