install_smbclient_ubuntu_nextcloud_smb_external_storage
Install smbclient on Ubuntu for NextCloud smb external storage
NextCloud has external storage support, but you can add smb/cifs support in addition to the existing available providers listed in the external storage app of Nextcloud
Log into Nextcloud as an administrator. Go to Apps, and make sure External Storage is enabled.
Go to Administrative Settings and select External Storage. In the drop down window of providers, you will notice S3, etc., but not SMB/CIFS.
ssh into your Ubuntu Nextcloud server, and run the following command to install smbclient:
C:\Windows\system32>ssh user@domain.com user@domain.com's password: sudo apt install smbclient
Microsoft Windows [Version 10.0.19045.5011] (c) Microsoft Corporation. All rights reserved. C:\Windows\system32>ssh user@domain.com user@domain.com's password: Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-125-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro System information as of Wed Nov 13 10:22:02 PM UTC 2024 System load: 0.08 Temperature: 33.0 C Usage of /: 12.3% of 1.79TB Processes: 178 Memory usage: 4% Users logged in: 0 Swap usage: 0% IPv4 address for eno1: 192.168.2.106 Expanded Security Maintenance for Applications is not enabled. 0 updates can be applied immediately. 14 additional security updates can be applied with ESM Apps. Learn more about enabling ESM Apps service at https://ubuntu.com/esm New release '24.04.1 LTS' available. Run 'do-release-upgrade' to upgrade to it. Last login: Wed Nov 13 19:50:06 2024 from 47.206.64.127 user@svr:~$ sudo apt install smbclient [sudo] password for user: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: gconf-service gconf-service-backend gconf2-common libgconf-2-4 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libldb2 libsmbclient libtalloc2 libtdb1 libtevent0 libwbclient0 python3-gpg python3-ldb python3-samba python3-talloc python3-tdb samba-common samba-common-bin samba-dsdb-modules samba-libs Suggested packages: heimdal-clients python3-markdown python3-dnspython cifs-utils The following NEW packages will be installed: libldb2 libsmbclient libtalloc2 libtdb1 libtevent0 libwbclient0 python3-gpg python3-ldb python3-samba python3-talloc python3-tdb samba-common samba-common-bin samba-dsdb-modules samba-libs smbclient 0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 11.8 MB of archives. After this operation, 56.8 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 libtalloc2 amd64 2.3.3-2build1 [25.6 kB] Get:2 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 libtevent0 amd64 0.11.0-1build1 [39.2 kB] Get:3 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libwbclient0 amd64 2:4.15.13+dfsg-0ubuntu1.6 [266 kB] Get:4 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 samba-common all 2:4.15.13+dfsg-0ubuntu1.6 [75.7 kB] Get:5 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 libtdb1 amd64 1.4.5-2build1 [46.4 kB] Get:6 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libldb2 amd64 2:2.4.4-0ubuntu0.22.04.2 [154 kB] Get:7 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-ldb amd64 2:2.4.4-0ubuntu0.22.04.2 [41.7 kB] Get:8 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 python3-talloc amd64 2.3.3-2build1 [13.0 kB] Get:9 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 samba-libs amd64 2:4.15.13+dfsg-0ubuntu1.6 [6,276 kB] Get:10 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libsmbclient amd64 2:4.15.13+dfsg-0ubuntu1.6 [65.9 kB] Get:11 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 smbclient amd64 2:4.15.13+dfsg-0ubuntu1.6 [474 kB] Get:12 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-gpg amd64 1.16.0-1.2ubuntu4.2 [214 kB] Get:13 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 python3-tdb amd64 1.4.5-2build1 [15.5 kB] Get:14 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-samba amd64 2:4.15.13+dfsg-0ubuntu1.6 [3,115 kB] Get:15 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 samba-common-bin amd64 2:4.15.13+dfsg-0ubuntu1.6 [620 kB] Get:16 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 samba-dsdb-modules amd64 2:4.15.13+dfsg-0ubuntu1.6 [313 kB] Fetched 11.8 MB in 2s (6,958 kB/s) Preconfiguring packages ... Selecting previously unselected package libtalloc2:amd64. (Reading database ... 160197 files and directories currently installed.) Preparing to unpack .../00-libtalloc2_2.3.3-2build1_amd64.deb ... Unpacking libtalloc2:amd64 (2.3.3-2build1) ... Selecting previously unselected package libtevent0:amd64. Preparing to unpack .../01-libtevent0_0.11.0-1build1_amd64.deb ... Unpacking libtevent0:amd64 (0.11.0-1build1) ... Selecting previously unselected package libwbclient0:amd64. Preparing to unpack .../02-libwbclient0_2%3a4.15.13+dfsg-0ubuntu1.6_amd64.deb ... Unpacking libwbclient0:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Selecting previously unselected package samba-common. Preparing to unpack .../03-samba-common_2%3a4.15.13+dfsg-0ubuntu1.6_all.deb ... Unpacking samba-common (2:4.15.13+dfsg-0ubuntu1.6) ... Selecting previously unselected package libtdb1:amd64. Preparing to unpack .../04-libtdb1_1.4.5-2build1_amd64.deb ... Unpacking libtdb1:amd64 (1.4.5-2build1) ... Selecting previously unselected package libldb2:amd64. Preparing to unpack .../05-libldb2_2%3a2.4.4-0ubuntu0.22.04.2_amd64.deb ... Unpacking libldb2:amd64 (2:2.4.4-0ubuntu0.22.04.2) ... Selecting previously unselected package python3-ldb. Preparing to unpack .../06-python3-ldb_2%3a2.4.4-0ubuntu0.22.04.2_amd64.deb ... Unpacking python3-ldb (2:2.4.4-0ubuntu0.22.04.2) ... Selecting previously unselected package python3-talloc:amd64. Preparing to unpack .../07-python3-talloc_2.3.3-2build1_amd64.deb ... Unpacking python3-talloc:amd64 (2.3.3-2build1) ... Selecting previously unselected package samba-libs:amd64. Preparing to unpack .../08-samba-libs_2%3a4.15.13+dfsg-0ubuntu1.6_amd64.deb ... Unpacking samba-libs:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Selecting previously unselected package libsmbclient:amd64. Preparing to unpack .../09-libsmbclient_2%3a4.15.13+dfsg-0ubuntu1.6_amd64.deb ... Unpacking libsmbclient:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Selecting previously unselected package smbclient. Preparing to unpack .../10-smbclient_2%3a4.15.13+dfsg-0ubuntu1.6_amd64.deb ... Unpacking smbclient (2:4.15.13+dfsg-0ubuntu1.6) ... Selecting previously unselected package python3-gpg. Preparing to unpack .../11-python3-gpg_1.16.0-1.2ubuntu4.2_amd64.deb ... Unpacking python3-gpg (1.16.0-1.2ubuntu4.2) ... Selecting previously unselected package python3-tdb. Preparing to unpack .../12-python3-tdb_1.4.5-2build1_amd64.deb ... Unpacking python3-tdb (1.4.5-2build1) ... Selecting previously unselected package python3-samba. Preparing to unpack .../13-python3-samba_2%3a4.15.13+dfsg-0ubuntu1.6_amd64.deb ... Unpacking python3-samba (2:4.15.13+dfsg-0ubuntu1.6) ... Selecting previously unselected package samba-common-bin. Preparing to unpack .../14-samba-common-bin_2%3a4.15.13+dfsg-0ubuntu1.6_amd64.deb ... Unpacking samba-common-bin (2:4.15.13+dfsg-0ubuntu1.6) ... Selecting previously unselected package samba-dsdb-modules:amd64. Preparing to unpack .../15-samba-dsdb-modules_2%3a4.15.13+dfsg-0ubuntu1.6_amd64.deb ... Unpacking samba-dsdb-modules:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Setting up libtdb1:amd64 (1.4.5-2build1) ... Setting up onlyoffice-documentserver (8.2.1-38) ... Generating AllFonts.js, please wait...Done Generating presentation themes, please wait...Done Generating js caches, please wait...Done Installing plugins, please wait...Done Congratulations, the ONLYOFFICE documentserver has been installed successfully! Setting up samba-common (2:4.15.13+dfsg-0ubuntu1.6) ... Creating config file /etc/samba/smb.conf with new version Setting up libtalloc2:amd64 (2.3.3-2build1) ... Setting up python3-tdb (1.4.5-2build1) ... Setting up libtevent0:amd64 (0.11.0-1build1) ... Setting up python3-gpg (1.16.0-1.2ubuntu4.2) ... Setting up libldb2:amd64 (2:2.4.4-0ubuntu0.22.04.2) ... Setting up python3-talloc:amd64 (2.3.3-2build1) ... Setting up libwbclient0:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Setting up python3-ldb (2:2.4.4-0ubuntu0.22.04.2) ... Setting up samba-libs:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Setting up libsmbclient:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Setting up smbclient (2:4.15.13+dfsg-0ubuntu1.6) ... Setting up samba-dsdb-modules:amd64 (2:4.15.13+dfsg-0ubuntu1.6) ... Setting up python3-samba (2:4.15.13+dfsg-0ubuntu1.6) ... Setting up samba-common-bin (2:4.15.13+dfsg-0ubuntu1.6) ... Checking smb.conf with testparm Load smb config files from /etc/samba/smb.conf Loaded services file OK. Weak crypto is allowed Server role: ROLE_STANDALONE Done Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.8) ... Scanning processes... Scanning processor microcode... Scanning linux images... Running kernel seems to be up-to-date. The processor microcode seems to be up-to-date. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. user@svr:~$
install_smbclient_ubuntu_nextcloud_smb_external_storage.txt · Last modified: 2024/11/13 22:36 by wikiadmin