Hey there,
i've got a question about adding a line automated to smb.conf.
When i make changes over omv to smb shares, a new smb.conf is written out.
Where is the process/template that i can edit, to add a simple line in smb.conf automated?
I need to add an include statement at the end of the document. (i don't want to edit file manually after every change)
Is this possible?
And, if we r already at this point, is it possible, if i add a new user over omv to create a file in a specified directory - like /etc/smb/puc/new_user.conf
So, what i want to do is, hide folders from certain users. The only way to do this over per-user-configuration.
So, in smb.conf i set browseable = no, then in user.conf i set [share] browseable = yes. This seem to work.
I don't think there is any way to write out all config files automatically (smb.conf and all user.confs), so that only valid users get browseable = yes.
So, any solutions are welcome. Thanks for your help
Christoph
Edit: Maybe its also possible to run a shell-script after editing. But i have to call this this... Is there any way to call this script aber smb.conf writeout?
So, i would like to try to program a shell-script after saving smb.conf.
1) read-out smb.conf
2) delete per-user-configuration
3) read out shares
4) loop from first to last share. Do in every share:
check if browseable = no. if no, then:
- read valid users
- for every valid user, create {valid_user}.conf (where valid_user is the name of the user, so every user gets his own file) . add line [share_name], add line browseable = yes
- go to next share
- ignore [homes]
5) done