[Samba] creating a machine account for a Windows VM from the command line

Ray Klassen ray.klassen at icloud.com
Wed Dec 13 16:35:44 UTC 2023


simplest thing to do is disconnect the vm from the network (disable the
network card in the hypervisor?) 
log into the vm with an admin domain account. (if you've used the
account on this computer before, it's got a local hash of the password)
set the password on the local user. forcibly disconnect from the domain
with powershell ("remove-computer -force" or something like that.) 
maybe rename the VM if possibly another computer got added with the
same name that clobbered the VM's account. 
re-enable the network card.
reboot. 
log in with the local user.
rejoin the domain.

On Mon, 2023-12-11 at 20:43 -0500, Gary Dale via samba wrote:
> I had the need to access a Windows 10 VM but discovered I was locked 
> out. I have the passwords for the domain administrator and a domain
> user 
> but I get an error "The security database one the server does not
> have a 
> computer account for this workstation trust relationship".
> 
> I normally have a local user account to log in with but its password 
> isn't the one I remember.
> 
> There are various convoluted ways to try to reset a Windows password
> for 
> a VM, but I'm hoping that there is a way to add the computer account 
> back in without having to do that or set up a new VM.
> 
> 


More information about the samba mailing list