Tableau Server on Linux -- Connecting to a Windows Shared Directory

Version 1

    This topic explains how to configure Tableau Server on Linux to connect to shared directories in a Windows/Active Directory environment. These types of shared directories use a Windows unified naming convention (UNC) path, for example, \\server_name\directory\subdirectory.

    When completed, this scenario enables users running Tableau Desktop to publish workbooks using datasources located on the shared directories to an instance of Tableau Server for Linux. It also enables other users to view and edit the workbooks from the server. For example, many organization will share Excel files on Windows shared directories. The files may be updated by other users and processes, which are then consumed by Tableau as a data source.

    Note: This article describes how to configure autofs and automount. The content here is specific to Linux, autofs, and automount. Inclusion of this information is not an endorsement and is provided as a convenience for our customers. Tableau can only offer limited support for this process, and while we make every effort to keep references to third-party content accurate and up to date, the information provided here might change without notice. For more information, see nfs-autofs (Red Hat, opens in a new window) or autofs.8.html (ubuntu, opens in a new window) .

    We recommend using autofs to manage mounted filesystems. You can specify as many mounted filesystems as you need in the auto.cifs file. Unlike a standard mount operation, which loads all remote filesystems during startup, autofs will mount the remote filesystems dynamically as required by the system.

    There are two accounts required for this scenario:

    • Windows account: the Windows account that you specify in the auto.cifs file must have read access to the target directory on the Windows computer. In the configuration described here, the username and password for the Windows account is stored in the auto.cifs file. As a best practice, we recommend creating a Windows account that is restricted such that it only has read access to the shared directory. The Windows account is specified by the usernameparameter in the auto.cifs file.
    • Linux local account: You must specify a local Linux account that has access to Tableau Server resources. We recommend that you specify the default, unprivileged user, tableau. The Linux local account is specified by the uidparameter in the auto.cifs file.

    To configure access to a Windows directory

    1. Run the following command to install autofs

      sudo yum -y install autofs cifs-utils (RHEL-like systems)

      sudo apt-get install -y autofs cifs-utils linux-image-extra-`uname -r` (Ubuntu)

    2. Add the following line to /etc/auto.master:

      /- /etc/auto.cifs --timeout=14400 --ghost

      The --ghost option manages creating and deleting of the directories.

    3. Create the file /etc/auto.cifs.

      For each directory share you are configuring, enter a line in the auto.cifs file:

      /mnt/server_name/directory -fstype=cifs,domain=<NetBIOS or Computer name>,username=<Windows user name>,password=******,sec=ntlm,noserverino,iocharset=utf8,uid=tableau,file_mode=0777,dir_mode=0777,vers=2.1 ://FQDN/directory

      For example, the following line configures a Windows directory with these attributes:

      /mnt/filesrv01/development -fstype=cifs,domain=EXAMPLE,username=dataread,password=******,sec=ntlm,noserverino,iocharset=utf8,uid=tableau,file_mode=0770,dir_mode=0770,vers=2.1 ://filesrv01.example.lan/development

      • Server UNC path: \\filesrv01\development
      • NetBIOS domain name: EXAMPLE
      • Windows user name: dataread
      • FQDN: filesrvo1.example.lan
    4. Start the automount deamon, or reload the configuration if it was already installed on your system:

      sudo systemctl start autofs

      sudo systemctl reload autofs

    5. Log in to TSM by running the following command:

      tsm login -u <user_name>

    6. Run the following command to specify all of the mount points that you created in the auto.cifs file:

      tsm configuration set -k native_api.unc_mountpoints -v 'mountpoints'

      For the value, include the server UNC path and the FQDN path for each shared Windows directory, separated by a semicolon, for example:

      tsm configuration set -k native_api.unc_mountpoints -v '//filesrv01/development;/mnt/filesrv01/development;//filesrv01.example.lan/development;/mnt/filesrv01/development;//devshare/repo;/mnt/devshare/repo;//devshare.example.lan/repo;/mnt/devshare/repo'

      Subsequent updates to the native_api.unc_mountpoints value will overwrite the existing value. Therefore, each time you add a Windows share, you must include all shares in the updated value.

    7. When you are finished, run the following command:

      tsm pending-changes apply