RancidGnar Posted June 5 Posted June 5 (edited) Hey all, I've had a bit of a look through the forums and spent a few hours on this now, but definitely need some help to work out what's happened. I don't really know how to sum it up so it may be a longer than needed post, sorry. Yesterday, I had the server added as a network drive on my windows machine. I upgraded the CPU yesterday afternoon and booted back up, everything worked, I could access the media on there and stream via Jellyfin, and I could see the network drive in my quick access panel in windows explorer. This morning I went to move files to the server and opened the main directory via quick access, then opened one of the folders, and there was nothing in there. I checked the array and could see all the data was intact, I could access all directories via the WebGUI, but not the network drive folder on windows. I cleared my windows credentials to try and get it to prompt me to log in again, no so then I cleared my quick access cache, so now I can't even see the network drive I did have there when trying to re-add the drive, it can't be found via browse if I try to add the ip address, it cant access it, same if I use the server name I confirmed I was part of the same workgroup Followed this article to set it up originally and still can't access it enabled smbv1 flushed dns, renewed ipconfig settings made sure my SMB settings havent changed, they are still as shows in the image attached many reboots in between I can't work this out, any help is greatly appreciated, diagnostics attached. homeserver-diagnostics-20240605-0253.zip Extra information: I can see the server now but keep getting a permissions error. I've added the user in unraid, added the user credentials for that user into windows credentials for the server, but keep getting the below. The network is absolutely started, I can still stream from it. Edited June 5 by RancidGnar extra info Quote
Frank1940 Posted June 5 Posted June 5 OK. First thing first. Are you logging into your Unraid server using a 'Share Users' login? (You should be doing this using a Windows Credential if you are using a mapped drive. Recent versions of Windows {by default} will not allow you access to a server without a valid login account on that server!) IF you need help in setting SMB correctly, see here: https://forums.unraid.net/topic/110580-security-is-not-a-dirty-word-unraid-windows-1011-smb-setup/ It is much easier to set things up correctly than trying to 'hack' things to make them work. (MS is determine to try and stop you from doing that!) By the way, you turn-on SMBv1 (by enabling NETBIOS) which is a security risk and, additionally, is turned off by default in Windows anyway! And, be sure to read that entire first post of this thread as it addresses some changes that MS has done to enhance security recently. Next thing. Using Windows File Explorer (or File Manager, to use an old term). Type \\HOMESERVER in the address bar and see what you get. If that doesn't work, try the IP address of that server. (My recent experience is that only one of the two will work...) One more thing, because Windows networking is very persistent about its 'state', don't be afraid to reboot the client often. There is no way to reset things back to the bootup state from Windows itself. Quote
RancidGnar Posted June 7 Author Posted June 7 (edited) @Frank1940 sorry for the delay. Since the original post the issue has changed a bit. I ended up resetting my Windows as my C: drive needed it anyway. I still cannot map the server as a network drive, however, I can see it in 'Network' in File Explorer. When I open the directory, however, I don't see all my files. I know these files are still intact because I can see them via the Unraid webgui and access them via Jellyfin. I believe I have set SMB up correctly in Unraid, I went through that linked post to help set it up originally, but not since resetting windows. SMB v1 is off. Insecure connections is enabled. The credentials used to log into my PC are not the same as the details used when trying to map the server. Same username, but different password. This user has read/ write access to all shares and disks All shares and disks are set to export = on and security = public (at this stage) My PC is part of the same workgroup I set up a 'network neighborhood' folder before I had this issue, that was how I originally got it working. That folder was still there after the windows reset, but produces the same results as accessing \\HOMESERVER via network I've attached diagnostics and images of what I can see and what happens when trying to map the server The other two folders show as empty but are not homeserver-diagnostics-20240607-0703.zip Edited June 7 by RancidGnar additional info Quote
Frank1940 Posted June 7 Posted June 7 3 hours ago, RancidGnar said: The credentials used to log into my PC are not the same as the details used when trying to map the server. Same username, but different password. I am not so sure this is not the problem. Either make (1) the single username have the same password in both situations, or (2) have different username for each login. Are you using Windows Credentials to store the username and password to your server? The reason for all of this concern is that Windows SMB will (silently) attempt to log into a server using usernames and passwords that it has for that user account on the PC. As I understand, it tries the one stored in Windows Credential Manager first. If it does not find one there, it will use the username and password for the PC's user account. If these fail, Unraid will login the client using a 'guest' account (public) privileges. Windows (in its default configuration) not longer allows guest type logins because of security concerns. (I think it displays that "Windows cannot access ...." message when this happens.) Quote
Frank1940 Posted June 7 Posted June 7 Just looked at your diagnostics. (They are generally fairly useless in troubleshooting SMB issues!) Look at your SHARES tab in the GUI*, are there two shares--- one named media and the other Media ? If so, that is a problem for Windows. While Linux is case-sensitive, Windows is not. Therefore windows will only 'know' about one of these two items and it will ignore the other. (The first one it finds is the one it will use...) * The reason for this question is this in the diagnostics file: Quote
RancidGnar Posted June 9 Author Posted June 9 I just updated my unraid user password to match the one used to login to my windows machine and still no dice. I made sure to clear the credentials in credential manager and chose to sign in with other account details, still unable to connect. I think the duplicate 'media' share is the issue. If I change the SMB setting for 'Media' then it updates the settings for 'media' as well. But I do not remember creating this share, so I wonder how it was created. media shows no files in the web UI where Media is the actual storage location. Windows seems to be showing media, which is why it's empty. But when I try to map the server as a network drive via server name/ ip address I still get the 'windows cannot access....' error. I'll create a new share, moves the data from Media to the new share, and delete Media and media and see if this persists. Quote
Solution RancidGnar Posted June 9 Author Solution Posted June 9 Update: created new share 'New Media' - export = yes - security = public Moved data from 'Media' to 'New Media' Can see 'New Media' in Homeserver via 'network' and it shows all files set export = no for 'Media' deleted the 'Media' share So I can now access the server and shares via windows explorer, which is great. My concern now is will this possibly be an issue at a later date? since the security is 'public' that means any PC on the network can access the share, yes? I haven't mapped the server as a network drive, as I can see it in 'network', so I'm assuming I don't really need to. Changing this to private, I just need to make sure the credentials used to log into the PC are the same as the Unraid user I am accessing the shares under? That's what I understand at least, and so long as credential manager has the correct credentials saved I shouldn't have an issue. Quote
itimpi Posted June 9 Posted June 9 If you had top level folders on the drives named 'media' and a 'Media' share then this would cause problems. Windows (and therefore Samba) is case insensitive whereas Linux is not. You would not know which of those two folders would be selected by Samba as the one to share over the network as SMB shares are case insensitive. If you now have a redundant folder (with different capitalization) then make sure you delete the redundant one. Quote
Frank1940 Posted June 9 Posted June 9 1 hour ago, RancidGnar said: Changing this to private, I just need to make sure the credentials used to log into the PC are the same as the Unraid user I am accessing the shares under? That's what I understand at least, and so long as credential manager has the correct credentials saved I shouldn't have an issue. I almost hate to post this up the following as it is 11 years old. (99% of the stuff there is probably true today but there is probably something there that has changed...) https://forums.unraid.net/topic/25064-user-share-problem?tab=comments#comment-228392 Start with Tom's post and read on. As you can see a lot of stuff is happening in the background when logging onto a server and most of it is completely silent. When all of the various ways to log onto a server are exhausted, Unraid's Samba will offer to log you in with a guest account. Which, currently, Windows (in its default mode) will reject to accept. Using Credential Manager is probably the most-foolproof method to log onto your server. Using your Windows login name and password probably works but there are a couple of gotchas that I know about right off the top. First one is that your SMB user name must begin with a small letter! (I don't believe that is a requirement for the Windows login...) Second, if you change your Windows login password, the Share User password on the Unraid side is not automatically updated at the same time. 5 hours ago, RancidGnar said: I think the duplicate 'media' share is the issue. If I change the SMB setting for 'Media' then it updates the settings for 'media' as well. But I do not remember creating this share, so I wonder how it was created. This can happen in a Docker containr has 'media' rather than 'Media' in a variable parameter. (It could probably also happen in the same situation in a VM..) 5 hours ago, RancidGnar said: media shows no files in the web UI where Media is the actual storage location. Windows seems to be showing media, which is why it's empty. But when I try to map the server as a network drive via server name/ ip address I still get the 'windows cannot access....' error. This is an issue that can happen with Samba/SMB transactions. Since Linux is case sensitive, 'media' and 'Media' are two separate directories. With Windows (which is not case sensitive), that situation can not exist! (If you try to create a file/directory in Windows with only a case difference, Windows will response with a message of 'that file already exists'!) So there is no need to address it. It is a Samba/SMB problem that has never been completely addressed and probably has no satisfactory solution. Let me make one suggestion. Do not make Share names with 'spaces' in them. Use an underscore or a dash for a space. i.e., New_Media instead of New Media The reason being is that you have to remember to use a escape character in a command line command. (A space indicates the beginning of a new variable being passed to the command. With Unraid shell program, this escape character is a backslash ( \ ) and thus New Media has to entered as New\ Media when using the command line. A minor problem, perhaps, but it is avoidable. 2 hours ago, RancidGnar said: My concern now is will this possibly be an issue at a later date? since the security is 'public' that means any PC on the network can access the share, yes? It is a security issue if you are concerned about your data. (I am not only talking data theft here but malware/ransomware...) Home networks use to be relatively secure. But WIFI has changed that situation. I understand that there are kiddy-scripts which apparently can break WIFI passwords relatively quickly. Many folks install a router and never update the firmware and the router manufacturers often stop offering security updates after a few years. The default settings on a router are the ones which will generate the fewest support calls and not the ones that provide the most security. 1 Quote
RancidGnar Posted June 10 Author Posted June 10 13 hours ago, Frank1940 said: It is a security issue if you are concerned about your data. (I am not only talking data theft here but malware/ransomware...) Home networks use to be relatively secure. But WIFI has changed that situation. I understand that there are kiddy-scripts which apparently can break WIFI passwords relatively quickly. Many folks install a router and never update the firmware and the router manufacturers often stop offering security updates after a few years. The default settings on a router are the ones which will generate the fewest support calls and not the ones that provide the most security. Not so much a security concern as I run Ethernet to devices that allow it. More that I'm not sure if it being set to public caused this issue in the first place or not. 13 hours ago, Frank1940 said: This is an issue that can happen with Samba/SMB transactions. Since Linux is case sensitive, 'media' and 'Media' are two separate directories. With Windows (which is not case sensitive), that situation can not exist! (If you try to create a file/directory in Windows with only a case difference, Windows will response with a message of 'that file already exists'!) So there is no need to address it. It is a Samba/SMB problem that has never been completely addressed and probably has no satisfactory solution. This is great to know, I'll go through and update the share name to remove the sapce 13 hours ago, Frank1940 said: I almost hate to post this up the following as it is 11 years old. (99% of the stuff there is probably true today but there is probably something there that has changed...) I'll review this today and see if I've missed anything. Thank you so much for the help here. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.