Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

<Solved> Samba Shares Not Working

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Huecuva
Posts: 135
Joined: 2017-06-09 04:00

<Solved> Samba Shares Not Working

#1 Post by Huecuva »

So I'm still working on this fit-PC3 device. I mentioned before that I have a 160GB HDD that I am using as storage. It will contain all the MP3s that this thing will be streaming with MPD and icecast. It is formatted with ext4 and I have it auto mounting in fstab to <path/to/mount>. The goal is to have this folder shared so that I can access it from my Windows machine and transfer MP3s to it over my LAN. I have installed and attempted to configure Samba. I have created a samba user and given it a password. My /etc/samba/smb.conf file contains:

Code: Select all

client max protocol = NT1
[Library]
   comment = Radio Music Library
   path = </path/to/mount>
   read only = no
   browsable = yes
   
I have configured Windows to use NTLMv2 session security if negotiated. I have also commented out the line "valid users = %s" in an attempt to make this work. I have also tried adding "valid users = <samba username>". Nothing I have tried has worked.

I can see my shared folder on the network, but when I try to access it, it asks for the login credentials and will not accept the username and password I created for the samba user.

What do?

EDIT: Figured it out mostly myself.
Last edited by Huecuva on 2020-03-22 04:27, edited 1 time in total.

trinidad
Posts: 297
Joined: 2016-08-04 14:58
Been thanked: 15 times

Re: Samba Shares Not Working

#2 Post by trinidad »

https://serverfault.com/questions/87916 ... with-samba

On a private LAN I don't bother with this stuff. I also use a Windows administrator account and password to login from the Linux side. Use gpe-msc and also check/set your Windows firewall. Also just because the share folder shows up in Windows doesn't mean that Samba is working. Some users have found that v1 works better than v2 for large files. My advice - if you're on Windows 10 - install SSH. More straightforward.

TC
You can't believe your eyes if your imagination is out of focus.

Huecuva
Posts: 135
Joined: 2017-06-09 04:00

Re: Samba Shares Not Working

#3 Post by Huecuva »

trinidad wrote:https://serverfault.com/questions/87916 ... with-samba

On a private LAN I don't bother with this stuff. I also use a Windows administrator account and password to login from the Linux side. Use gpe-msc and also check/set your Windows firewall. Also just because the share folder shows up in Windows doesn't mean that Samba is working. Some users have found that v1 works better than v2 for large files. My advice - if you're on Windows 10 - install SSH. More straightforward.

TC
I am able to connect to my shares on my HTPC which is running Linux Mint from my Windows machine. Though it was set up through the GUI and there is no mention of the shares at all in the smb.conf file on the HTPC. The fit-PC has no GUI, hence Samba. Also, I do have SSH installed on the Windows machine, as I was SSH'd into the fit-PC from the Windows PowerShell to set up the auto-mount and configure Samba. How do I use that to transfer files? I will look into the rest of what you suggested when I get some more time later.

EDIT: That's odd. I can't reach my HTPC shares from my Windows machine anymore. I was able to just last night.

EDIT #2: I've added these lines to the /etc/samba/smb.conf file:

Code: Select all

lanman auth = no
ntlm auth = yes
client lanman auth = no
and it didn't change anything.

I've also gone into gpedit in Windows and it is already set to allow insecure connections. I've also tried pretty much every available NTLM setting in Windows with the only result being I've completely lost the ability to see anything at all on my LAN. I can no longer access my HTPC from my Windows rig or access my Windows rig from my HTPC. My whole LAN is borked over this now. I was able to get it so I could see the HTPC and the fit-PC on my LAN (though I was still unable to access them) briefly, but I can't do that anymore. I don't even know what changed. This is annoying.

EDIT #3: I was able to fix most of my LAN. I am now able to access my HTPC from my Windows machine and vice versa again, but I am still unable to access the fit-PC from the Windows machine. Now it won't even ask for credentials, though. It just says it's not accessible.

Huecuva
Posts: 135
Joined: 2017-06-09 04:00

Re: Samba Shares Not Working

#4 Post by Huecuva »

Alright. Having added guest ok = yes to my /etc/samba/smb.conf file, I can now access the shared folder on the fit-PC device. However, even though it says read only = no I am still unable to copy anything to the folder.

EDIT: Well, it was all working except for the inability to copy a file to the shared folder from my Windows rig. Then, for some reason I can no longer access the shared folder on the network. All I did was chmod 666 </path/to/> so the </mount> directory would be writable to everyone. I didn't change any more network configuration. Only the permissions on the shared folder. Why did it stop working?

For more clarification: Currently, I am able to SSH into the fit-PC from my HTPC, but not from my Windows rig. I am currently SSH'd into the fit-PC from my Windows rig through the HTPC. I cannot even ping the fit-PC from my Windows machine. Previously, I couldn't ping the fit-PC from my router, either, even though I was SSH'd into it through my HTPC as I am now. I rebooted the fit-PC though, and now the router is able to ping it. I am also once more unable to access the shares on my HTPC for mysterious reasons. It just keeps asking for a password it will not accept. I literally just fixed this. Everything that should be set so that this works was set minutes ago.

EDIT AGAIN: Well, it appears I've gotten it all to work again. It would be nice if Windows told you it needed to be rebooted for changes to take effect when you edit the NTLM settings.

trinidad
Posts: 297
Joined: 2016-08-04 14:58
Been thanked: 15 times

Re: <Solved> Samba Shares Not Working

#5 Post by trinidad »

It would be nice if Windows told you it needed to be rebooted for changes to take effect when you edit the NTLM settings
Most network things are like that because of Windows update and security configs, often even when using .msc GUIs. Stop and restart services from the CLI works for some things, but not others. It's like Spam - the mystery meat -- tastes good sometimes but no one really knows what's in it. By the way, don't be surprised if Windows changes it all back after a security update.

TC
You can't believe your eyes if your imagination is out of focus.

Huecuva
Posts: 135
Joined: 2017-06-09 04:00

Re: <Solved> Samba Shares Not Working

#6 Post by Huecuva »

Ugh. Windows.

Why can't Windows just die?

Post Reply