[Samba] net ads join fails with pre-created machine accounts

Rowland Penny rpenny at samba.org
Sat Oct 10 06:20:32 UTC 2026


On Sat, 10 Oct 2026 00:04:55 +0000
"Boushy, Phillip via samba" <samba at lists.samba.org> wrote:

> I found an email from 2017[1] and a similar from 2019[2] that appear
> to be the same as what we’re attempting.
> 
> 
> Our Active Directory admins have made it where we have to create
> computer objects through a tool. After we create the computer object,
> we receive a password that is unique to that computer. We are able to
> use that password to join to the AD computer object on all of these:
> - Windows 11 
> - Ubuntu using SSSD to the computer object (using adcli with the
> --one-time-password argument)
> - Redhat using SSSD to the computer object (using adcli with the
> --one-time-password argument)
> 
> We are unable to do it on Fedora 44 using the ’net ads join’ command.
> 
> We initially tried using `-U 'COMPUTER_NAME$%machine_password'` and
> that didn’t work: ```
> $ net ads join -U ‘COMPUTER_NAME$%machine_password’ AD.EXAMPLE.COM
> ads_print_error: AD LDAP ERROR: 50 (Insufficient access): 00000005:
> SecErr: DSID-031A11CF, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
> 
> Failed to join domain: Failed to set account flags for machine
> account (NT_STATUS_ACCESS_DENIED) $
> ```
> 

I think the problem here is that Samba, unlike Windows, does not allow
a normal user to join computers to the domain and a computer is not
only a computer, it is also a normal user, so it cannot join computers
to the domain, not even itself.

You are either going to have to delegate permissions to the computer,
see here:

https://wiki.samba.org/index.php/Delegation/Joining_Machines_to_a_Domain

Or temporarily join the computer to the Domain Admins group.

Rowland






More information about the samba mailing list