So, there's some computer, whether a server or just a regular machine, and this computer has a Samba service set up on it, which provides shared resources.
The need arose to change the machine's IP address. We change it, but then discover that Samba, for some reason, has stopped letting anyone in.
Having run into this myself, I found that the machine with Samba had simply fallen out of the domain.
What helped me. We log in to the Samba computer and run:
$ sudo net ads join -U domainadminuser
Using short domain name -- MYDOMAIN
Joined 'SERVERNAME' to realm 'mydomain'
where, accordingly, domainadminuser is the username of the domain administrator who has the right to join a machine to the domain, MYDOMAIN and mydomain are the name of your domain, and SERVERNAME is the name of this machine.
Let's check:
$ sudo wbinfo -t
checking the trust secret for domain MYDOMAIN via RPC calls succeeded
$ sudo wbinfo -u
$ sudo wbinfo -g
$ sudo wbinfo -a domainuser%mysuperpassword
PS. This assumes that only the IP address of the Samba machine was changed, and that all the settings of Samba itself, as well as Winbind and Kerberos, were left untouched and were working before that. In other words, this is NOT a "how to set it up from scratch" manual.
The same applies if, say, the addresses of the domain controllers or something else were changed - then you'll need to dig into the Samba config. Here we only describe the case where the IP address of the computer hosting the shares itself was changed.
Comments