sparcktikus Posted April 3, 2015 Share Posted April 3, 2015 Hi Anyone know how to edit /etc/samba.conf so that it will persist through reboots? i have tried editing file and tested its use and works fine for what i want (have media player accessing unraid box) But every time i reboot, my changes to config have gone and player doesnt work! Help pls Quote Link to comment
itimpi Posted April 3, 2015 Share Posted April 3, 2015 Hi Anyone know how to edit /etc/samba.conf so that it will persist through reboots? i have tried editing file and tested its use and works fine for what i want (have media player accessing unraid box) But every time i reboot, my changes to config have gone and player doesnt work! Help pls That location is in RAM which is why it does not persist across restarts. If you need something to persist it needs to be stored ion the USB stick and copied into position on each boot via adding entries to the /boot/config/go file. Having said that I am not sure under what conditions regenerates the smb.conf file so changes might be lost anyway. Quote Link to comment
bonienl Posted April 3, 2015 Share Posted April 3, 2015 You can add changes to /boot/config/smb-extra.conf to make them persistent. Quote Link to comment
sparcktikus Posted April 3, 2015 Author Share Posted April 3, 2015 have tried making changes to /boot/config/smb-extra.conf no joy cant get it to work. have tried it for both folders /boot/config/smb-extra.conf & /boot/config/smb-extra.conf˜ which is the correct folder anyways?? Quote Link to comment
Frank1940 Posted April 3, 2015 Share Posted April 3, 2015 have tried making changes to /boot/config/smb-extra.conf no joy cant get it to work. have tried it for both folders /boot/config/smb-extra.conf & /boot/config/smb-extra.conf˜ which is the correct folder anyways?? Since you are interested in modifying samba.conf, I assume that you are familiar how to use that file. I would suggest you open it in an editor and look to see what files are being included during the processing of that file. The reason, I say that is that years ago when I was looking at it for some reason or other, is that I seem to recall that the included file was being processed at the beginning of the samba.conf file rather then at the end of the file. Thus, the samba.conf could modify what you were trying to set with smb-extra.conf. Quote Link to comment
sparcktikus Posted April 4, 2015 Author Share Posted April 4, 2015 Has anyone had any success keeping samba.conf after reboot, either by editing /boot/config/smb-extra.conf or entries into GO script.? Could someone please provide example of coding needed if its at all possible thanks Quote Link to comment
gfjardim Posted April 4, 2015 Share Posted April 4, 2015 have tried making changes to /boot/config/smb-extra.conf no joy cant get it to work. have tried it for both folders /boot/config/smb-extra.conf & /boot/config/smb-extra.conf˜ which is the correct folder anyways?? /boot/config/smb-extra.conf is not a folder, it's a file. Quote Link to comment
Frank1940 Posted April 4, 2015 Share Posted April 4, 2015 Has anyone had any success keeping samba.conf after reboot, either by editing /boot/config/smb-extra.conf or entries into GO script.? Could someone please provide example of coding needed if its at all possible thanks This is the file that is involved whenever samba starts: [global] # configurable identification include = /etc/samba/smb-names.conf # log stuff only to syslog log level = 0 syslog = 0 syslog only = Yes # we don't do printers show add printer wizard = No disable spoolss = Yes load printers = No printing = bsd printcap name = /dev/null # misc. max protocol = SMB3 invalid users = root unix extensions = No wide links = Yes use sendfile = Yes aio read size = 0 aio write size = 0 # ease upgrades from Samba 3.6 acl allow execute always = Yes # hook for user-defined samba config include = /boot/config/smb-extra.conf # auto-configured shares include = /etc/samba/smb-shares.conf Note the files that get included. /etc/samba/smb-shares.conf and /etc/samba/smb-names.conf are both generated at bootup from the settings in the config folder on your Flash drive which in turn are generated with you enable the various files systems on the server. The only file that you can use to make changes to smaba operation is the /boot/config/smb-extra.conf file which you have to create. (You have to use a linux-smart editor by the way!) However, note where it loads in the file. smb-shares.conf has the last word in determining the final settings for samba operations. If your smb-extra.conf sets one thing to a setting and smb-shares.conf does something different with that same setting, the smb-shares.conf is the one is honored! (I consider that to be a bug but no one has really complained so I assume that it has never been found to be an issue.) By the way, changing samba parameters is not something for the beginner to be attemting. Google for the Samba manual and download it if you truly have to change things in a way that unRAID does not provide for. Quote Link to comment
bonienl Posted April 4, 2015 Share Posted April 4, 2015 As an example the content of my /boot/config/smb-extra.conf file [global] domain master = no preferred master = Yes os level = 35 Quote Link to comment
sparcktikus Posted April 4, 2015 Author Share Posted April 4, 2015 Hi Anyone know how to edit /etc/samba.conf so that it will persist through reboots? i have tried editing file and tested its use and works fine for what i want (have media player accessing unraid box) But every time i reboot, my changes to config have gone and player doesnt work! Help pls If i can refer back to the original question i can get the system working as i want but will not survive a reboot without editing again this is what i put in smb.conf, and it works [global] [Films] comment = Films path = /mnt/user/Films public = yes writable = no I have tried putting same code into boot/configsmb-extra.conf but will still not survive a reboot i understand what youre saying about samba.conf resides in ram so does not survive reboot, just looking at alternative ways to get what i need , i do my editing with notepad++ so should not be a problem looking at a bit more coding to get what i want, but i am not skilled in that area (learning slowly) so am stumped at the moment Quote Link to comment
BRiT Posted April 4, 2015 Share Posted April 4, 2015 You've already been told how to make it survive reboots. Pay close attention to what has already been posted and follow it. There's nothing more any of us can tell you. Quote Link to comment
Frank1940 Posted April 4, 2015 Share Posted April 4, 2015 Hi Anyone know how to edit /etc/samba.conf so that it will persist through reboots? i have tried editing file and tested its use and works fine for what i want (have media player accessing unraid box) But every time i reboot, my changes to config have gone and player doesnt work! Help pls If i can refer back to the original question i can get the system working as i want but will not survive a reboot without editing again this is what i put in smb.conf, and it works [global] [Films] comment = Films path = /mnt/user/Films public = yes writable = no I have tried putting same code into boot/configsmb-extra.conf but will still not survive a reboot i understand what youre saying about samba.conf resides in ram so does not survive reboot, just looking at alternative ways to get what i need , i do my editing with notepad++ so should not be a problem looking at a bit more coding to get what i want, but i am not skilled in that area (learning slowly) so am stumped at the moment So what is the content the the section for 'Films' in the file at /etc/samba/smb-shares.conf As I said, it will take precedence over whatever you attempted to set up in smb-extras.conf .... By the way, you can write your own smb.conf file save it to your flash drive. Then write a BASH script (which could be called in the 'go' file) which stops samba after the server boots, copy your file over to the proper spot on the RAM drive >>> /etc/samba <<< and restart samba. It will then restart and be using your settings. (It has been more that eight years since I have done any thing remotely like that you you will have to work through that Samba Manaual and figure out exactly how to get everything working.) Quote Link to comment
trurl Posted April 4, 2015 Share Posted April 4, 2015 What functionality do you get from those settings that you can't get from a secure share in the normal way? Just make the share secure and don't give anyone write access. Quote Link to comment
sparcktikus Posted April 4, 2015 Author Share Posted April 4, 2015 So what is the content the the section for 'Films' in the file at /etc/samba/smb-shares.conf As I said, it will take precedence over whatever you attempted to set up in smb-extras.conf .... By the way, you can write your own smb.conf file save it to your flash drive. Then write a BASH script (which could be called in the 'go' file) which stops samba after the server boots, copy your file over to the proper spot on the RAM drive >>> /etc/samba <<< and restart samba. It will then restart and be using your settings. (It has been more that eight years since I have done any thing remotely like that you you will have to work through that Samba Manaual and figure out exactly how to get everything working.) Thanks Frank Thats the way i shall be heading Thank you Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.