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
- 415 Beta Program
- 2.5K Nebula
- 152 Nebula Ideas
- 101 Nebula Status and Incidents
- 5.8K Security
- 296 USG FLEX H Series
- 281 Security Ideas
- 1.5K Switch
- 77 Switch Ideas
- 1.1K Wireless
- 42 Wireless Ideas
- 6.5K Consumer Product
- 254 Service & License
- 396 News and Release
- 85 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.6K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 87 About Community
- 76 Security Highlight