Edit smb.conf in Voxel Firmware

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.


New Around Here
Hi everybody,

I’m sorry for the dumb question, newbie here. I installed the latest (awesome) Voxel firmware on my R7800 and got a SSH connection.

I'd like to edit and add some lines to the smb.conf, but if I edit /etc/samba/smb.conf with nano, at the reboot it gets overwritten.

How can I do?

Thank you
Last edited:

R. Gerrits

Senior Member
Modifying it via shell is not really easy. Also see this older post:
smb.conf from /mnt/sda1/overlay isn't copied at boot

afaik, /usr/sbin/update_smb is creating/modifying the smb.conf

and this script is called from tons of different locations:
[email protected]:/rom$ grep -ir /usr/sbin/update_smb
etc/init.d/br-mode:        /usr/sbin/update_smb
etc/init.d/net-br:    /usr/sbin/update_smb
etc/init.d/net-lan:    /usr/sbin/update_smb
etc/init.d/samba:    /usr/sbin/update_smb
grep: sbin/led_all: binary file matches
grep: usr/sbin/net-cgi: binary file matches
grep: usr/sbin/readycloud_unregister: binary file matches
grep: usr/sbin/remote_share_conf: binary file matches
grep: usr/sbin/remote_smb_conf: binary file matches
grep: usr/sbin/remote_user_conf: binary file matches
usr/share/udhcpc/default.script.ap:            /usr/sbin/update_smb
usr/share/zcip/zcip.script:    /usr/sbin/update_smb

So a potential solution: replace the binary /usr/sbin/update_smb with some script that copies your desired smb.conf into /etc/samba/smb.conf
(and hope that the other scripts don't expect some specific exit code from update_smb)

And then accept that after that, all modifications would have to be done manually in that smb.conf.
I.e. everything in GUI that would previously make settings, will no longer have any effect.

So might be too difficult for a newbie...


Regular Contributor
I’ve done this. You need to save your modified file in the overlay. I’m not in front of my computer so I can’t send you detailed instructions. I’ll later today


Regular Contributor
OK, so I'm on an Orbi with Voxel so this might not apply 100% to your scenario. Please DO CHECK your paths and not just copy and paste!
Over time I used 2 different paths to my solution. As per the other thread, I had the same problem you had and every time there was a reboot the Samba configuration was reset. Voxel eventually fixed it and I assume it's also fixed on the R7800/R9000.

Path 1​

I edited my smb.conf, restarted Samba only and verified it worked. Once I had it working I copied it to
/mnt/sda1/overlay/etc/samba. Because in the early days the Orbi didn't read my configuration correctly at boot I also created a script that I manually ran after boot (I tried to automate that, but didn't work for me). This is the script:
/bin/echo "Killing Samba services" >> /var/log/messages
/usr/bin/killall smbd
/usr/bin/killall nmbd
/bin/echo "Updating Samba conf" >> /var/log/messages
cp -f /mnt/sda1/overlay/etc/samba/smb.conf /etc/samba/smb.conf
/usr/sbin/taskset -c 1 /usr/sbin/smbd -D > /dev/null 2>&1
/usr/sbin/taskset -p 1 `/bin/pidof usb-storage` > /dev/null 2>&1
/usr/sbin/nmbd -D
/bin/echo "Samba restarted" >> /var/log/messages

Path 2​

Voxel kindly fixed the issue for me so now, as long as I have the smb.conf in
/mnt/sda1/overlay/etc/samba/ it all works magically.


I would suggest you try Path 2 first and if it doesn't work use Path 1. I hope this helps.

R. Gerrits

Senior Member
on R7800, /etc/samba is a symlink to /tmp/samba
thus lost at reboot and recreated during boot.

Removing the symlink /etc/samba and then copying /tmp/samba to /etc/samba will place that folder in the overlay. And thus it will persist during reboot. (but not during firmware upgraded).

But that doesn't solve the issue mentioned earlier, that /usr/sbin/update_smb will mess with the smb.conf on multiple occasions. (during boot, but also when you plug-in a usb-disk and who knows on what other moments)
You could try if placing in overlay is sufficient for your purposes. But if not then you have no other option then to replace update_smb with some custom script.


New Around Here
Thank you for your replies.

I opened (total newbie here) update_smb with nano and I saw that the smb.conf “template” is hard coded in there.
It would be great to add the possibility to create a file in a certain position that would be appended to the template.

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!