Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

samba.conf doesn't persist through reboots

Featured Replies

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

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.

  • Author

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??

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.

  • Author

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

 

 

 

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.

 

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. 

As an example the content of my /boot/config/smb-extra.conf file

 

[global]

domain master = no

preferred master = Yes

os level = 35

 

  • Author

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

 

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.

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.)

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.

  • Author

 

 

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

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.