I'm trying to create a script to automatically open a list of SMB shares from the command-line.
The script uses sqlite3 to update the 'sharing_cifs_share' table in freenas-v1.db, as stated by a veteran forum user here :
www.truenas.com
It works : the updates I do immediatey appear in the UI.
But the actual shares are not affected (or, kinda randomly, actually).
Right now, the shares I opened are indeed open, but deleting them all has no effect... shares remain open.
Changing the list of shares (still through the DB) has no effect either, it looks like samba is now stuck with the first list of shares I created.
What I tried :
- service smbd reload
- service samba_server restart
- service -R
How should I make FreeNAS (11.3U5) aware of the updates made through freenas-v1.db ?
Or is it not the right way to do this anymore ?
The script uses sqlite3 to update the 'sharing_cifs_share' table in freenas-v1.db, as stated by a veteran forum user here :
create CIFS share through shell / cli
Hi all, does anyone knows how I can create cifs shares through the shell/ssh? I have to create many of them so the web interface is took slow and it costs too much time. I tried to add all shares to smb.conf, and it was working, but it was not shown by the web interface and after a reboot...

It works : the updates I do immediatey appear in the UI.
But the actual shares are not affected (or, kinda randomly, actually).
Right now, the shares I opened are indeed open, but deleting them all has no effect... shares remain open.
Changing the list of shares (still through the DB) has no effect either, it looks like samba is now stuck with the first list of shares I created.
What I tried :
- service smbd reload
- service samba_server restart
- service -R
How should I make FreeNAS (11.3U5) aware of the updates made through freenas-v1.db ?
Or is it not the right way to do this anymore ?