[Samba] Rename Computer on Domain

Paul Littlefield info at paully.co.uk
Wed Jul 26 09:32:25 UTC 2023


I can report that the computer renaming worked.

As it turned out, only the cn was incorrect ...

ldbsearch -H ldap://DC1 -UAdministrator 'CN=DT06'

dn: CN=DT06,OU=Desktops,OU=Computers,DC=domain,DC=com
objectClass: computer
cn: DT06
operatingSystem: Windows 10 Pro
displayName: WH23$
sAMAccountName: WH23$

... so a simple LDAP rename worked ...

ldbrename -H ldap://DC1 -UAdministrator 'CN=DT06,OU=Desktops,OU=Computers,DC=domain,DC=com' 'CN=WH23,OU=Desktops,OU=Computers,DC=domain,DC=com'

... and then for future full rename on the domain, we will use ...

net dom renamecomputer -S OLDNAME -U OLDNAME\\administrator%secret newname=NEWNAME account=DOMAIN\\administrator password=topsecret reboot

Thanks.

-- 

Paul Littlefield




More information about the samba mailing list