How to make a share hidden in Zentyal

This note describes adding functionality to the Zentyal 4 Community Edition. As usual, no any warranties nor support is provided, it is your own risk etc.

I know, there is another way to do the same by hard-code samba shares, and it could be useful in some cases, but my goal was to extend functionality without losing the usability. However, you should be aware of chance of overwriting modified files by software update. When this occurs, all hidden shares will become visible.

This way requires access to the command line using SSH or whatever - but only once.

cd /usr/share/zentyal/stubs/samba
cp shares.conf.mas shares.conf.mas.original
nano shares.conf.mas

There you have to find the block started with [<% $share->{share} %>]

Below this line, replace string "browseable = Yes" with the next piece of condition:

% if ($share->{comment} eq 'hidden') {
    browseable = No
% } else {
    browseable = Yes
% }

That's all! To make samba share hidden, all you need is to set comment "hidden" using GUI.

why do we need enigma, if cyrillic is exists?