samba shares control through ssh commands
basiltehpod
Posts: 1
Hello
I`ve boght NAS 326 and now got a task to transfer all our company files to it. No problem, users and shares - created via ssh. But there are options to enable the share and its access rules, just adding strings to smb.conf doesn`t solve the problem. Each user has a share so clicking "enable" and putting rw-flags in the web-iface - that`s too long.
I need a fast and simple solution via ssh for future installations of the same NASes.
Please, help.
I`ve boght NAS 326 and now got a task to transfer all our company files to it. No problem, users and shares - created via ssh. But there are options to enable the share and its access rules, just adding strings to smb.conf doesn`t solve the problem. Each user has a share so clicking "enable" and putting rw-flags in the web-iface - that`s too long.
I need a fast and simple solution via ssh for future installations of the same NASes.
Please, help.
0
All Replies
-
I'm afraid there is no easy way. Smb.conf is on boot (and on each change) dynamically generated by the backend, and the actual data is stored in a database which resides in flash (mounted on /etc/zyxel/)It is possible to patch the /etc/init.d/samba.sh to use an alternate copy of smb.conf, but in that case there is no relation between the backend (and webinterface) and the actual shares anymore. Further this has to be done on each boot, as /etc/init.d/samba.sh is volatile. If you want something like this, have a look at my 'samba replacement script' for Entware on older NSA boxes. If you want I have also ways to execute a script on boot.Another option could be to backup the configuration of a furnished box, and put that in the others. Don't know if that actually works, though. Maybe the configuration is hardware dependent.0
Categories
- All Categories
- 347 Beta Program
- 2.1K Nebula
- 115 Nebula Ideas
- 77 Nebula Status and Incidents
- 5K Security
- 44 USG FLEX H Series
- 246 Security Ideas
- 1.2K Switch
- 64 Switch Ideas
- 900 WirelessLAN
- 33 WLAN Ideas
- 5.8K Consumer Product
- 204 Service & License
- 326 News and Release
- 71 Security Advisories
- 21 Education Center
- 5 [Campaign] Zyxel Network Detective
- 1.8K FAQ
- 832 Nebula FAQ
- 402 Security FAQ
- 219 Switch FAQ
- 190 WirelessLAN FAQ
- 45 Consumer Product FAQ
- 136 Service & License FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 71 About Community
- 61 Security Highlight