Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Cannot connect NAS
#1
No matter what I try I cannot connect my NAS in moOde (it works with Jellyfin, AudioBookshelf, and other services and in Windows/Linux). It is a Samba share running on an Ubuntu server managed by Webmin. The scan didn't find it, but by entering the IP a connection was attempted but permission was denied. After reading some other forum posts here I realised that issue could be with my Samba settings, specifically the protocol level. So I edited my global samba config file to add  'min protocol = SMB3_11'. I restarted samba and the scan now finds my server/NAS, but still only connected when using the IP address. So progress, but I am still getting permission denied.


Quote:20250328 085204 worker: Try (mount -t cifs "//FORNAX/mynas" -o username="daniel",password="12345678",rsize=61440,wsize=65536,iocharset=utf8,ro,noserverino,cache=none,dir_mode=0777,file_mode=0777 "/mnt/NAS/mynas")
20250328 085204 worker: Err (mount error: could not resolve address for FORNAX: Unknown error)
--
20250328 085320 worker: Try (mount -t cifs "//192.168.1.50/mynas" -o username="daniel",password="12345678",rsize=61440,wsize=65536,iocharset=utf8,vers=3.1.1,ro,noserverino,cache=none,dir_mode=0777,file_mode=0777 "/mnt/NAS/mynas")
20250328 085320 worker: Err (mount error(13): Permission denied


Please can anyone suggest anything else that I can try, either in moOde or in Samba. I have run out of ideas and I can't find anything else on the forums.

I am running 8.3.9 on Pi Zero W with a JustBoom Dac Zero hat. These is my samba config for Global and my NAS.


Code:
[global]
    passwd program = /usr/bin/passwd %u
    workgroup = WORKGROUP
    server role = standalone server
    wins support = true
    log file = /var/log/samba/log.%m
    unix password sync = yes
    max log size = 1000
    auto services = mynas
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    logging = file
    os level = 20
    server string = Fornax
    panic action = /usr/share/samba/panic-action %d
    obey pam restrictions = yes
    pam password change = yes
    map to guest = bad user
    netbios name = fornax
    default = mynas
    usershare allow guests = yes
    min protocol = SMB3_11


[mynas]
    valid users = daniel
    revalidate = yes
    writeable = yes
    comment = mynas on fornax
    path = /mnt/mynas
Reply
#2
I have tried changing the os level in my samba conf to 65, but this didn't help. I have also looked through my Samba log files to see if that sheds any light on why and where permission is being denied. This is the only error is in all log files, and seems to be getting generated when I try to authenticate,

lib/param/loadparm.c:1934(lpcfg_do_service_parameter)
Ignoring unknown parameter "revalidate"

I can only connect to the NAS from windows if I enable smb1.0 support (bad I know), so this suggests that my samba share is not configured correctly for smb3.
Reply
#3
Here's the (i) help for the "Path" input field
Code:
SCAN generates a list of paths to SMB or NFS shares found on the network. A path consists of the host or IP address followed by a forward slash followed by the share name for example SomeHost/ShareName.

Delete those two forward slashes // and you should be all set.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
Thanks for replying, but I am not adding those two forward slashes in the interface. They must be added in code, as they only appear in the error log. I have tried every combination of server name and IP in the web gui. I can see from the debug log which names aren't connecting, and which ones are generating permission denied.

I just SSH'd into the Pi running moOde and tried to run that command manually :
mount -t cifs "//192.168.1.50/mynas" -o username="daniel",password="12345678",rsize=61440,wsize=65536,iocharset=utf8,vers=3.1.1,ro,noserverino,cache=none,dir_mode=0777,file_mode=0777 "/mnt/NAS/mynas"
I needed to use mkdir to make the dir, but then it failed with :
mount.cifs: permission denied: no match for /mnt/NAS/mynas found in /etc/fstab

So I wonder if the permission issue is local to the Pi, rather than at the Samba end. I removed that one revalidate flag, and I am now getting no errors at the Samba end. I even uninstalled Samba completely from my server, reinstalled it, and reconfigured it. All the other services can see the share, but moOde can't. It could of course still be something at the Samba end, but I'm not sure what else I can try there.
Reply
#5
If I click scan it finds FORNAX/mynas, which doesn't resolve. I am not sure why it is capitalizing it, and it should be Fornax/mynas. Anyway, as that doesn't resolve I am using edit path manually to change it to 192.1.168.50/mynas which resolves, but gives me mount error(13): Permission denied.
Reply
#6
@pagandan

Quote:If I click scan it finds FORNAX/mynas, which doesn't resolve.


This suggests to me that you don't have a local DNS resolver running on your LAN.

I don't on mine. The scan function finds, for example, "OMV1/Music", which is my OpenMediaVault server (running on a Pi 5B) and its Music share. I have to hand-edit the path to "OMV1.local/Music" before saving the remote NAS source info in moOde.

Upper/lowercase doesn't matter in hostnames. They will all be interpreted as lowercase.

As for the rest of it, I can't see the fire for the smoke. I'm having no trouble serving SMB shares from my Linux hosts, including my Linux Mint  (a derivative of Ubuntu) laptop.

Regards,
Kent

ETA - moOde uses mDNS services to find sources which is why my OMV server is found without a local DNS resolver.
Reply
#7
(03-28-2025, 11:42 AM)pagandan Wrote: Thanks for replying, but I am not adding those two forward slashes in the interface. They must be added in code, as they only appear in the error log. I have tried every combination of server name and IP in the web gui. I can see from the debug log which names aren't connecting, and which ones are generating permission denied.

I just SSH'd into the Pi running moOde and tried to run that command manually :
mount -t cifs "//192.168.1.50/mynas" -o username="daniel",password="12345678",rsize=61440,wsize=65536,iocharset=utf8,vers=3.1.1,ro,noserverino,cache=none,dir_mode=0777,file_mode=0777 "/mnt/NAS/mynas"
I needed to use mkdir to make the dir, but then it failed with :
mount.cifs: permission denied: no match for /mnt/NAS/mynas found in /etc/fstab

So I wonder if the permission issue is local to the Pi, rather than at the Samba end. I removed that one revalidate flag, and I am now getting no errors at the Samba end. I even uninstalled Samba completely from my server, reinstalled it, and reconfigured it. All the other services can see the share, but moOde can't.  It could of course still be something at the Samba end, but I'm not sure what else I can try there.

Right, the slashes are added by the code.

Use sudo to run the mount command
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
You're right, there is a DNS resolver on my LAN. So I can also use fornax.local/mynas, instead of 192.168.1.50/mynas. Both resolve, but both also fail to connect with permission denied.

I switched to the command line so I could try all the different mount cifs options more quickly, but still without joy. I think I've tried every combination of 'vers' and 'dir_mode', etc. now, but I can't get anything to work. As mentioned above I already reinstalled, and reconfigured my samba install to make sure that it's the latest version, with default options. The new samba share works with Jellyfin, Audiobookshelf, etc. Just as the old one did. But I just can't get anything to work with moOde. Which is really annoying because I really want to use it, but not being able to access my music is kind of a blocker for me :/
Reply
#9
Quote:Use sudo to run the mount command


Thanks. This gives slightly more detailed error messages (I am also using the --verbose flag).  Now when I try to use any 'vers' lower than 3.1.1 I get an 'Operation not supported'. When I do use 'vers=3.1.1' I get permission denied. 

I am now trying all combinations of the 'sec' flag as well to see if there if I need to define a specific security protocol. I am also just stepping through the cifs-utils manual to see if I can see any other options that might help.
Reply
#10
in dmesg I now get the following errors :

[ 4634.469659] CIFS: Attempting to mount \\192.168.1.50\mynas
[ 4634.484905] CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
[ 4634.485049] CIFS: VFS: \\192.168.1.50 Send error in SessSetup = -13
[ 4634.485136] CIFS: VFS: cifs_mount failed w/return code = -13

The login credentials are correct, I've even added and tried to use different shares and different users. But for some reason I just can't logon?
Reply


Forum Jump: