[Samba] Ubuntu upstart script ad dc

Stefan Kania stefan at kania-online.de
Sat Jan 7 11:41:42 UTC 2017


Am 07.01.2017 um 11:35 schrieb Max Kirchner via samba:
> I am running a samba ad on Ubuntu 16.04 configured as told in
> https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller
> 
> The server is running fine currently, but I have to manually start it
> after every reboot. The link to the upstart scripts in the wiki are dead:
> https://wiki.samba.org/index.php/Samba_AD_Init_Script_Examples
> Does anyone have a functioning init script I could use?
> 



Here a little howto:

vi /etc/system.d/system/samba-ad-dc.service

----------------------script--------------
[Unit]
Description=Samba4 AD DC
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
ExecStart=/usr/sbin/samba -D --configfile=/etc/samba/smb.conf
PIDFile=/var/run/samba.pid

[Install]
WantedBy=multi-user.target
--------------------------------------------
(Rember use your path to smb.conf and samba.pid)

systemctl daemon-reload

systemctl list-unit-files | grep samba
        samba-ad-dc.service            disabled

systemctl enable samba-ad-dc

systemctl list-unit-files | grep samba
        samba-ad-dc.service            enabled

systemctl start samba-ad-dc

systemctl status samba-ad-dc

-------------- 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/20170107/f3441271/signature.sig>


More information about the samba mailing list