Shares configuration¶
The shares config file uses the Python INI format (Python’s ConfigParser format). The file is broken up into sections, each section representing an SMB share. The syntax for each section is as follows:
[section_name]
url = /<url_name>
path = smb://server.domain.tld/share/
menu = <menu_name>
display = <display_name>
[section_name]must be a unique name for this smb share, however it is never displayed to the end user.urlis the url displayed or entered by the user to access this share, e.g. /yournameherepathis the SMB URI of the share on the remote server to connect tomenuis the name of the menu which should be marked as active when the share is being browsed by the userdisplayis what bargate will display as the name of the share
Variable insertion¶
Sometimes you want to use the username of the user using the share as part of the SMB server path. Bargate supports this by dynamically at runtime replacing variables with the username or, if using LDAP home dir support, the home directory of the user. These variables are:
%USERNAME%- resolves to the username%USER%- resolves to the username%LDAP_HOMEDIR%- resolves to the LDAP home directory of the user, if present
See LDAP Home directory support for LDAP home directory support
Examples¶
[webfiles]
url = /webfiles
path = smb://webfiles.soton.ac.uk/%USERNAME%/
menu = home
display = My Website
[dfs]
url = /dfs
path = smb://soton.ac.uk/
menu = dfsroot
display = DFS Root
[homedir]
url = /home
path = %LDAP_HOMEDIR%
menu = homedir
display = My Files