# Network storage on Windows

The 4ALLPORTAL can work with SMB-compatible servers using the Windows network drive functionality.
These "mounts" can be used to share the configurations in a cluster or to attach external storage like a NAS as file storage for assets.

# Mount as NT Authority

Since Windows services cannot access mounts that have been created with a user or administrator, the mount needs to be created as "NT AUTHORITY\SYSTEM".

Please note: These mounts appear as "Disconnected Network Drive", but are working just fine.

To do that on every startup, you need to setup a startup script in the computer configuration. These scripts run as the Local System account and are able to create mounts for services.

# Setup a startup script

  1. Open the Group Policy Management Console: Run gpedit.msc in Windows' Run-dialog (Win + R)

  2. Go to path Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)

    img.png

  3. Double click Startup and add a new script:

    • Create a new .cmd-file on your local filesystem and add it to the startup script list.
    • The script should contain commands to mount the external share. Remember to put your credentials, since the Local System account cannot forward any Active Directory credentials. Please take a look at the Microsoft documentation (opens new window) for further explanation.
    • Example script:
      @ECHO OFF
      net use Q: \\share01.organization.tld\4allportal "secr3t" /USER:ORG\shareuser /PERSISTENT:YES
      
  4. Click "OK" and reboot the server. The network mount should now appear as "Disconnected Network Drive".

# 4ALLPORTAL mount configuration

You now need to configure the path in the 4ALLPORTAL mount configuration:

  • Open the 4ALLPORTAL and go to Administration/DAM/Mount Configuration.
  • Open the mount entry you would like to edit and enter the drive location as the "Root directory" (for example: Q:\assets).
  • Depending on the network share you might need to uncheck "Use File-IDs" and "Use Volume-IDs".

# Troubleshooting

To debug the net use command, use the Microsoft PSTools (download it here (opens new window)):

  1. Run an elevated Command Prompt.
  2. Go to the extracted PsTools folder with "PsExec.exe" in there.
  3. Run psexec.exe -i -s cmd.exe.
  4. Check with whoami that you are the "NT Authority".
    • Troubleshoot your net use commands.
    • net use L: /delete deletes network drives.
Request missing documentation