New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing NextCloudPi Samba from Windows #247
Comments
To give some more information about my problem... After initial installation of NextCloudPi... Here's how I set up SAMBA... I even checked via putty with smbpasswd pi which lets you create and change SAMBA users and their passwords. However the user Pi is there. I changed it's password but it was still rejected at the windows log-in to the SAMBA share so I gave up and just did this...
To this instead…
Then type in putty: Now I can at least browse the Samba share just by clicking on the share name on Windows Explorer.. it doesn't even ask me to type in a username/password... but I've made changes to your "NextCloudPi" share definition I suspect are not safe and it doesn't give me the correct access permissions to the actual files. Any idea what I am doing wrong? It's kind of really a SAMBA question... actually on other projects of mine I've never been able to figure out SAMBA authentication and permissions so I just make a share that is wide open by making my smb.conf file like this...
Thank you for your help, Flex |
Feels like I'm doing all the work here! Ha.. just kidding. So I made some changes to your /etc/samba/smb.conf file and now after restarting Samba I get one share on the Windows 7 explorer window called - NEXTCLOUDPI. When I click on this it displays two folders from the NextCloudPi Image and I don't get any username/password prompt. [NextCloudPi] -- Shows the files in /var/www/nextcloud/data/admin/files [root] -- Shows the root directory of the Raspbian Stretch Light OS So this is the way I always end up using Samba. The authentication never works for me and I don't really know what I'm doing so I just googled like crazy and found a way to make access to the shares wide open and apparently totally uncontrolled. I would much rather get the authentication working properly. I would be grateful if you have any helpful thoughts and feedback. Here is my smb.conf file in case anyone is interested...
|
hi Thanks for all that info and feedback. I think it would be nice to add a 'discoverable' option to NCP config, or maybe even make it non discoverable by default. Unfortunately I don't have a windows machine to test this on windows so somebody else will have to provide the 'perfect configuration' so I can tweak NCP. |
btw, probably this should be in the configuration
edit: nevermind, that's the default value ;D |
Let's wait to see if somebody else runs into the same problem or come up with a working configuration for windows. In Linux, I just mount it with I mount it using
In Arch I had to install gvfs-smb in order for nemo to be able to handle samba. Can you try this (adjust your IP)
I also wrote this |
Hello, Thanks for linking your other page with details on SAMBA... I checked with smbpasswd and the [pi] user does exist and I even changed the pwd to be sure I am using the correct one from the windows popup. I was wondering if I'm getting the windows username/password login pop up that then doesn't authenticate because of a mismatch between file access permissions specified in smb.conf and in the Raspbian OS. So here is a screenshot with output of the ls - l command. Those permissions should be ok I think to let me in from windows 7? I think Windows only recognises the OWNER bit and the [files] folder is [rwx]. But the share definition on the [files] folder is...
0777 means rwxrwxrwx but maybe the last four lines in the SAMBA share definition should be 7(rwx)7(rwx)5(r-x) ?? Well I tried changing those last four lines to 0775 and un-commenting the [ valid users] line. Now when I click on the share I get the pop-up authentication window again and username populates as NEXTCLOUDPI\pi and I type in the pasword but still get: My set up is basically a Windows 7 laptop and a Pi running your NextCloudPi image. I do have Ubuntu also that I can run from the laptop on Oracle Virtual Box (Virtual Machine). At the command line under Ubuntu I ran your command:
... with my details and indeed the [files] folder did show up in the /mnt directory with no problem. This suggests that Linux machines can connect fine to the NextCloudPi share but Windows machines probably need to make changes to smb.conf and for all I know... elsewhere too! I couldn't understand what you were talking about with gvfs-smb and nemo ?? Are these other ways of accessing Samba shares from a command line interface? There was no gvfs-smb to install via apt-get. Also I don't see myself ever wanting to connect to Samba shares via command line! Thank you, Flex |
Hi, the gvfs-smb is only for Arch Linux, so forget about that. It is needed in Arch to make samba accessible in Nemo, which is a Linux file explorer, so no command line ;). let's see if somebody has been able to do this in windows and can help with the configuration. |
No takers? Just to give a short re-cap on my problem. The smb.conf file with NextCloudPi sets up a Samba share so the documents you upload to NextCloudPi can be browsed directly from a file explorer window in a Unix type OS. It also enables password authentication of a specific user: Pi. However when I try to access this share in Windows 7 (Home Premium) Explorer I get the log-in dialogue box that doesn't authenticate me with the username and password I know is valid in Samba and Raspbian OS that NextCloudPi is installed on. Some change needs to be made to smb.conf so the authentication works from Windows. I have researched some more and in previous versions of Samba users have had this issue with a Windows 7 client that was solved with changes to the registry. I tried some of these changes to no avail. Any advice gratefully appreciated, Flex |
I spent some more time trying to get Samba authentication working from my Windows 7 Home Premium computer to Samba shares on Raspbian OS and figured it out with my own smb.conf file with much help from this thread... https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=195176&p=1223054#p1223054 So I tried again with the smb.conf file that comes with the NextCloudPi image (no changes made) and now my Windows 7 Home Premium computer CAN access the Samba shares on NextCloudPi image and authenticate correctly. I'm confused about what was going wrong for me. It is possible that my laptop was not using NTLMv2 authentication which Samba now supports.
... goes in the [GLOBAL] section and is the default value so doesn't need to be explicitly stated in smb.conf. So your setup will require Clients to use NTLMv2 to authenticate. It's possible my laptop was setup to only use NTLM. But I'm not sure if this was really my issue. If anyone has this same problem, you don't need to make any changes to the default NextCloudPi smb.conf file but if you are a Windows 7 user check that the registry DWORD: LmCompatibilityLevel in HKLM\SYSTEM\CurrentControlSet\Control\Lsa is set to 3 https://technet.microsoft.com/en-us/library/cc960646.aspx So I think this can be closed now. Thank you, Flex |
Good investigation, thanks! |
What version of NextCloudPi are you using? ( eg: v0.17.2 )
v0.31.12
What is the base image that you installed on the SD card? ( eg: NextCloudPi_07-21-17 )
09-27-17
You can discover this by executing
After initial installation and setup of NextCloudPi I cannot connect to the Samba share:
Expected behavior
I should be able to see the folders displayed in a Windows 7 explorer window in the path...
path = /var/www/nextcloud/data/admin/files
Actual behaviour
I can never get past the above login window no matter what username password combination I try. I get this error message:
Steps to reproduce, from a freshly installed image
I have setup SAMBA using both the command line and tried again via the web admin tool. I checked and SAMBA is running. After I confirmed that I could NOT connect via Samba I pasted into smb.conf my own share definition at the end that does let me in to the root of the Raspbian-Stretch OS with full access to everything. Obviously this is not safe practice... I would like to know why SAMBA does not authenticate for me from your image... do I need to change something in smb.conf??
Include logs
Nextcloud logs
SAMBA logs
mariaDB logs
The text was updated successfully, but these errors were encountered: