To start and stop the Samba server, you can use the script in /etc/init.d. The following command stops the Samba server:
Instead of specifying stop, you can also specify restart and start to reset a running server or start the server after it is stopped.
If you change the configuration file, you will need to restart the Samba server for the changes to take into effect.