Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


SMB - Possible to Disable?
#4
@S_i_O

Full disclosure - in this approach, the smbd (SMB server daemon) service is still enabled but isn’t configured to publish any shares. One can dig deeper into the O/S to disable the service itself. It’s not hard but I didn’t want to get into the sysop-level discussion.

Regards,
Kent


ETA: Changed my mind. I see use of systemctl showing up in other threads so let's go for the sysop-fu!

Instead of my hack, we can totally disable the smbd service from the command line

Code:
sudo systemctl kill smbd
sudo systemctl disable smbd

The first line kills any existing smbd processes and the second disables (duh!) the smbd service. This setting persists over reboots so no need to do it more than once.

At any time later, we can reverse the steps

Code:
sudo systemctl enable smbd
sudo systemctl start smbd


Note that if the /etc/samba/smb.conf file was renamed/moved it will have to be restored before any shares will appear on the LAN.

Sidebar question: this looks easy, Kent. Why didn't you start with this? 

Answers:  
  1. (this one makes me look sage) I wanted to leave open the possibility that other Samba functions might be wanted
  2. (this one just makes me look like a sage, e.g., old) My brain has fossilized, stuck in lessons I learned with the old Unix System 5 init. I have to think twice to remember the versatility of systemctl.
Reply


Messages In This Thread
SMB - Possible to Disable? - by S_i_O - 01-07-2022, 09:49 PM
RE: SMB - Possible to Disable? - by S_i_O - 01-08-2022, 01:27 PM
RE: SMB - Possible to Disable? - by TheOldPresbyope - 01-08-2022, 04:16 PM
RE: SMB - Possible to Disable? - by S_i_O - 01-09-2022, 03:13 PM
RE: SMB - Possible to Disable? - by S_i_O - 01-09-2022, 03:27 PM
RE: SMB - Possible to Disable? - by S_i_O - 01-09-2022, 08:24 PM
RE: SMB - Possible to Disable? - by Tim Curtis - 01-09-2022, 05:33 PM
RE: SMB - Possible to Disable? - by S_i_O - 01-09-2022, 08:21 PM
RE: SMB - Possible to Disable? - by Tim Curtis - 01-09-2022, 10:07 PM
RE: SMB - Possible to Disable? - by S_i_O - 01-10-2022, 03:31 PM
RE: SMB - Possible to Disable? - by TookaFace - 01-10-2022, 04:19 PM
RE: SMB - Possible to Disable? - by S_i_O - 01-11-2022, 07:10 PM
RE: SMB - Possible to Disable? - by hjheins - 02-13-2022, 11:19 AM

Forum Jump: