External storage password error

I’m running Nextcloud Hub 9 (30.0.6) on a fresh installation of Ubuntu 24.04. I have a brand new 5tb hdd that is mounted at /media/rakelbara/Expansion.

I have installed the External Storage App, but when I try to add my drive, my password is not accepted. I can see this is a bug that others have experienced. But I haven’t figured out how to get around this issue.
Can someone help?

Thanks in advance!

same here, people say that you can do it from the occ cli but personally i dont want to, if there is a gui for external storage i will use that instead of writing on a cli, no solution for it yet, i dont want to criticize the developer of the app but anyways… i left the link of the topic here if you want to take a look but its not a definitive solution bc when you mount storage it will be visible for all users and you have to CHANGE PROPERTIES AGAIN on the occ cli, its exhausting to do a simple task with 23342455 lines of commands..
link to the “”““solution””“”

Please check the log after entering the wrong password in that task.

If you leave the log in the comments, we may be able to provide further guidance.

[Bug]: External storage will prompt for password but always tell you it’s the wrong password · Issue #51919 · nextcloud/server

I have the same problem, it seems to be a bug.

My workaround is to do it via command line CCO command:
Share is on my QNAP \192.168.100.20\Media, Subfolder are Files\I-Tunes
Share should be acessible only to a group Audio:

sudo -u www-data php ./occ files_external:create AUDIO smb password::password -c host=192.168.100.20 -c share=/Media/ -c root=/Files/I-Tunes -c user=username -c password='Password'
--> Will return a ID for the Share, for example 9
sudo -u www-data php ./occ files_external:applicable --add-group Audio 9

Works perfekt as workaround

1 Like

Thank you works for me !!! :ok_hand:

Thank you very much, it is work for me

How does this workaround work on Docker Containers?!

Thanks everyone for the help here.

The problem with the password only occurs for me when I try to edit SMB mounts, not e.g. local mounts.

Anyways, now I have been able to add the groups to the external mounts, however, I need the “enable sharing” option to be turned on.

Anyone knows how to do that with the OCC commands?

btw this didn’t work:

sudo -u www-data php /var/www/nextcloud/occ files_external:config 5 enable_sharing true

Edit: Found it!

sudo -u www-data php /var/www/nextcloud/occ files_external:option 4 enable_sharing true

WORKAROUND - ADD SMB MOUNT TO NEXTCLOUD (DOCKER)

DESCRIPTION

Workaround to add SMB External Storage to Nextcloud
if the GUI experiences bugs or errors.
All steps are made CLI copy-paste friendly.

TEMPLATE VARIABLES

Replace the values below with your own environment values:

<CONTAINER_NAME> = Nextcloud container name
<MOUNT_NAME> = Display name of the storage in Nextcloud
<SMB_HOST> = SMB server IP or hostname
<SMB_SHARE> = SMB share name
<SMB_USERNAME> = SMB username
<SMB_PASSWORD> = SMB password
<MOUNT_ID> = External storage mount ID (usually 1 if first mount)

STEP 1 - ENTER NEXTCLOUD CONTAINER

docker exec -it <CONTAINER_NAME> bash

STEP 2 - INSTALL SMB DEPENDENCIES INSIDE CONTAINER

apt update
apt install -y nano smbclient sudo

exit

STEP 3 - ENABLE EXTERNAL STORAGE SUPPORT (GUI)

Login to Nextcloud Web GUI

Apps → Integration → External Storage Support → Enable

STEP 4 - ADD SMB EXTERNAL STORAGE VIA OCC CLI

NOTE:
Used as a workaround if the GUI is bugged or fails to create storage.

docker exec -u www-data <CONTAINER_NAME> php occ files_external:create
“<MOUNT_NAME>”
smb
password::password
–config host=<SMB_HOST>
–config share=<SMB_SHARE>
–config user=<SMB_USERNAME>
–config password=‘<SMB_PASSWORD>’

STEP 5 - ENABLE EXTERNAL STORAGE SHARING

NOTE:
Usually MOUNT_ID = 1 if this is the first mount.
If unsure, check using:

docker exec -u www-data <CONTAINER_NAME> php occ files_external:list

Enable sharing:

docker exec -u www-data <CONTAINER_NAME> php occ files_external:option <MOUNT_ID> enable_sharing true

DONE

The SMB External Storage should now appear in Nextcloud Files.