I recently had to rename a Windows server as part of a virtualization / server consolidation project. This server was part of a Samba controlled domain and I kept getting cryptic error messages, such as “access denied.”

Turns out no computer had ever likely been renamed in this domain, because it was missing the usermod command for renaming in the smb.conf.

To fix computer renaming in a samba ldap domain simply add:

rename user script = /usr/sbin/smbldap-usermod -r ‘%unew’ ‘%uold’

to your smb.conf

Which tells samba how to run the smbldap tools command for renaming a user/computer.

Related Tags: , , , ,