javiergc
Posts: 4
Joined: Tue Oct 18, 2016 9:26 am

Manually starting Samba at boot ?

Wed Feb 05, 2020 6:58 pm

Hello everybody !

I have installed Samba in my Pi 4 (Raspbian) and I can access my shared folders from Windows 10... but Samba always starts at boot time, and I prefer to start/stop the server manually, how can I do that ?

Thanks in advance!

peter_shaw
Posts: 13
Joined: Tue Feb 04, 2020 2:46 pm

Re: Manually starting Samba at boot ?

Thu Feb 06, 2020 10:49 am

samba is handled via systemctl. process name is "smbd".

Code: Select all

sudo systemctl disable smbd
this disables the autostart

Code: Select all

sudo systemctl start smbd
this starts the service

Code: Select all

sudo systemctl stop smbd
this stops the service

you can check the status with

Code: Select all

sudo systemctl status smbd

javiergc
Posts: 4
Joined: Tue Oct 18, 2016 9:26 am

Re: Manually starting Samba at boot ?

Thu Feb 06, 2020 1:12 pm

Thanks a lot ! I can prevent smbd to start at Raspian boot with:

$ sudo systemctl disable smbd

And to start at boot again:

$ sudo systemctl enable smbd

Only one more question please, is there any difference with these commands ?

$ sudo systemctl start smbd

$ sudo service smbd start

Return to “Networking and servers”