Created
March 9, 2017 19:26
-
-
Save atomize/e16daa2c09b7d6cf560bbd9649162998 to your computer and use it in GitHub Desktop.
Graceful samba reload to recognize changes to smb.conf without restart, as root:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#RUN AS ROOT | |
# To get samba to recognize changes to its smb.conf *without restart*, as root: | |
# 1) First test your configuration file for errors: | |
testparm /path/to/smb.conf; echo $? | |
#If it exits '0' you're good to go. | |
# 2) Find the parent SMBD | |
ps -ef | grep smbd | |
#In the list find the process parented by Init, or process 1. | |
#This is the parent smbd daemon to the other servicing children. | |
#) Issue that pid a SIGHUP: | |
kill -1 <yourPID> | |
#Done. This is regularly performed and confirmed to work without interruption a Samba cluster hosting thousands of clients. | |
# src: https://ubuntuforums.org/showthread.php?t=903896 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment