On our Window Domain Controller user shares are created with $ to make them hidden shares eg \dc\user$ - is there any way to specify that in the external storage app ? I tried the following for the Share field and none worked:
$user$ $user$ $user\$ $user’$’ $user"$" $user%24
In general is there a way to pass non-standard characters to input fields.
I verified that the system running Nextcloud (13.0.5.2) stable, on CentOS 7, php 7.1 can access the DC with the smbclient command as:
Same here. As bluesky.ca mentioned before, I am not able to mount hidden Windows smb shares with the $user variable. I also tried to escape the $ character in different ways. Also no success. The app ‘SMB connection test’ can mount the hidden share fine, but the external storage connector can’t. Neither with the $user variable nor the with the entered username and the $ appended. I really need this feature for a usecase in multiple schools to mount the home directories of the students.
Used nextcloud version: 15.0.2
Edit: I’ve updated to nextcloud version 15.0.5 with no results. We really need this feature ASAP
Finally
I’ve found the problem.
It seems that nextcloud tries to establish the smb connection directly with php.
With an modification in /var/www/nextcloud/apps/files_external/lib/config.php you can append the “$” for the hidden user shares to the user variable.
Just add $user .= “$”; under line 203, so that it’s set before the if-statement. But that’s just a workaround and works only with Windows Server 2008R2 and below
Solution
The final solution is to install the package php-libsmbclient, so nextcloud uses the smbclient on your nextcloud server to connect to the Windows Server with the hidden shares.
After that you can add the external storage in nextcloud.
Folder name: Choose free, it’s just the name inside of nextcloud
External Storage: SMB / CIFS
Authentication: Log-in credentials, save in database (diffrence to session is, that you can share your storage files and folders with other users)
Host: Your DC (I used the IP address)
Share: $user$
Additionaly I defined client min protocol = SMB2 client max protocol = SMB3
in the global section of /etc/samba/smb.conf
Hi,
In my case I don’t have this file: /var/www/nextcloud/public_html/apps/files_external/config.php
I find /var/www/nextcloud/public_html/apps/files_external/templates/settings.php
I hope that the developers include a checkbox in the future to choose if the share is hidden or not.
It’s always a good amount of luck if the patch works in the upcoming version, otherwise you have to search for a new solution. Not really that great if you deploy pre-configured environments to hundrets of customers.