Forums

Resolved
0 votes
I posted some months ago about this problem, but didn't get a resolution, and the Covid-19 lockdown distracted my attention until now. Here's a link to the previous topic:
https://www.clearos.com/clearfoundation/social/community/i-ve-installed-and-configured-samba-in-the-very-limited-way-allowed-by-the-samba-configuration-settings-screen-but-can-t-connect

I still can't get a samba connection to my ClearOS server, which is set up to host a Plex Media Server. I've had a series of different problems connecting to the plex server to access and play my media, only just resolved.

So I'm coming back to the issue - how do I get Samba to work?

The last comment in the previous thread asked if I had set up Flexshares. The answer is 'I have' and there is one set up called plexmedia. In the ClearOS console accessed at 192.168.0.31:81, it shows

Settings
Share Name
plexmedia

Status
Enabled

Description
Music video and photo sharing

Group
allusers

Third Party App Access
Read Only

Windows File Share
Status
Enabled

Permissions
Read/Write

Server URL
\\plexserver\plexmedia


And the Samba configuration panel says:

Server Name
plexserver

Server Comment
Media server

Home Directories
Enabled
WINS Support
Enabled

WINS Server
[blank and greyed out]


Using ssh from the iMac Terminal, I can connect and browse the files on the ClearOS server using Midnight Commander, so on request I can look at the contents of (for example) .conf files.

I've checked that the samba service is running:
systemctl status smb.service smb.service -l
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2020-06-13 00:27:32 BST; 2 days ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 1987 (smbd)
Status: "smbd: ready to serve connections..."
CGroup: /system.slice/smb.service
├─1987 /usr/sbin/smbd --foreground --no-process-group
├─1990 /usr/sbin/smbd --foreground --no-process-group
├─1991 /usr/sbin/smbd --foreground --no-process-group
└─2015 /usr/sbin/smbd --foreground --no-process-group


When I try to access the files in plexmedia from Finder on my iMac, whether by ipaddress or //plexmediaserver/plexmedia, I just just get a timeout with error message.

Whey I try to access the server from Terminal using
smb://192.168.0.31 or smb://plexmediaserver/plexmedia

I just get an error message: "no such file or directory."

I get the same result when trying to access the server from my Mac laptop instead of my iMac.

It's really annoying that I HAVE had this working in the past, on a previous standalone ClearOS server, whereas this one is a virtual machine running under VMware ESXi 6.5. However, I don't think that's anything to do with it.

Any suggestions to diagnose and fix this problem will be very much welcome. I'm stuck.

I CAN upload files via FTP, but it isn't nearly so convenient, or as fast, so I'd really like to get SAMBA working if possible.
Monday, June 15 2020, 08:40 PM
Share this post:
Responses (5)
  • Accepted Answer

    Tuesday, June 30 2020, 06:20 PM - #Permalink
    Resolved
    0 votes
    I think you need to start simple. Access the share from a Windows laptop using \\192.168.0.31\ in File Explorer address bar. You should see your share.
    If not then you need to make sure you have ClearOS set up right;
    The IP address should be either on the networks External Interface, under Networking Settings in the WebGUI or it should be on the LAN side if you have two NICs.
    To get the windows share to work you need both SAMBA (Windows Networking) and Flexshares both available from the market place. It will make you chose Windows Directory Server or LDAP, I use LDAP. You will need to create a user with some Windows Groups set.

    Your Flexshare needs to be set to share to Windows, it's off by default.

    Your Windows SAMBA should be set to Simple Server.

    If none of that works then format your server and start again.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, June 19 2020, 07:12 PM - #Permalink
    Resolved
    0 votes
    If you want to access a Flexshare from the ClearOS server you indeed can doing that by typing:


    smb://ip_adress_of_clearos_server


    in the "Connect to Server" window on your Mac. In my case I do "smb://192.168.100.2" and then tick "Connect". A screen pops up were you can enter you credentials. Tick "Connect" again and a new window will pop up with your shares. Select the share and Finder will display the files.

    I'm not sure why it is not working for you. Have you tried to access your shares with a Windows client or Linux client? I think if that is also not working there is something wrong with your VM.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, June 16 2020, 08:04 AM - #Permalink
    Resolved
    0 votes
    This is sounding very odd. From CelarOS, can you try "arping -I your_ClearOS_External_interface 192.168.0.31". You should get no replies. ctl+C to stop it.

    Please check that all three samba daemons are running, smb, nmb and winbind.

    Have you seen this thread?

    plexserver won't resolve unless it is fixed in the router as it is doing your DNS.
    FWIW 192.168.0.0/24 is not a brilliant choice of subnets.

    As it is the router's default, I just used it.
    That is exactly the reason. It is too common. If you ever try using OpenVPN you will not be able to pass traffic from another site using the same subnet. That and 192.168.1.0/24 are best avoided for that reason. 192.168.2.0/24 a but less so. Also if you ever add something like a router as a WAP and it happens to have the same default IP, you risk bringing your network down in a way that is hard to trace.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 15 2020, 10:07 PM - #Permalink
    Resolved
    0 votes
    You may be using the wrong URL.


    Sorry, typo in my post, not in what I entered in Terminal. Checked again, and I did use the //.

    Can you ping "plexserver". Does it resolve to 192.168.0.31?


    No, and No. But I don't normally use the share name, just the IP address. Ping works for the IP address, but smb:// to IP address doesn't work.

    Oddly, however, Finder remembers plexserver or sees it on the network - it appears as an entry when I click on Network in Finder. But it won't connect, either by name or IP address. It just fails to find the server, and never prompts me for a username or password.


    ping plexserver
    ping: cannot resolve plexserver: Unknown host


    Is ClearOS in Standalone or Gateway mode? Is it doing DNS/DHCP?


    Standalone, no firewall. It is not doing DNS. It WAS doing a (duplicate) DHCP server by mistake, but I changed DHCP to Disabled, restarted router (which is the DHCP server), ClearOS and my iMac.

    It makes no difference.

    FWIW 192.168.0.0/24 is not a brilliant choice of subnets.

    As it is the router's default, I just used it.

    What's the drawback?

    It would be a bit of a pain to change it, as I have about 30 permanently active devices on the network, and another 20 that were or can be active occasionally.

    Most have reserved fixed addresses handed out by the router.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 15 2020, 09:22 PM - #Permalink
    Resolved
    0 votes
    You may be using the wrong URL. You day you've tried using "smb:/plexmediaserver/plexmedia", but from the information you've provided, it should be "smb://plexserver/plexmedia" (also note // and not /).

    Can you ping "plexserver". Does it resolve to 192.168.0.31?

    Is ClearOS in Standalone or Gateway mode? Is it doing DNS/DHCP?

    FWIW 192.168.0.0/24 is not a brilliant choice of subnets.
    The reply is currently minimized Show
Your Reply