[Samba] Change machine name without a reboot?

Reindl Harald h.reindl at thelounge.net
Mon Feb 22 23:40:46 UTC 2016



Am 23.02.2016 um 00:35 schrieb Paul D. DeRocco:
> I'm having trouble changing the machine name programmatically on Samba 4
> (running under systemd). There's no "netbios name" option in smb.conf, so
> I'm relying on it using the hostname. Here's what I'm doing:
>
> 1) Call sethostname() with the new name.
>
> 2) Write the same name into /etc/hostname, to make it nonvolatile.
>
> 3) Read a decimal number from /var/run/smbd.pid.
>
> 4) Send SIGHUP to that process.
>
> Nothing happens. If I reboot, then the new name is announced on the
> network. How do I get it to do this without rebooting the entire system?

just restart the samba server instead only reload?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20160223/66286913/signature.sig>


More information about the samba mailing list