_Doc
Posts: 4
Joined: Sat Dec 29, 2018 6:22 pm

Samba acting unusual with Raspbian [Solved]

Sun Dec 30, 2018 1:40 am

Hello,

I am attempting to create a local file server at home. I am using Raspbian stretch desktop 14.4(Just did a update) on a raspberry pi 3 b+. I want to use a external HHD to act as the storage unit. I have created a file with my name that is owned by the user and group Kevin. As soon as I remove "Guest ok = yes" and add "valid users = kevin" windows tells me I do not have permission to access it and wont even prompt me to give my credentials. I then made a share in my home folder for user PI. With this one it asks for my credentials but when I enter the correct password and username that I setup for samba it once again says I don't have permission. I am honestly at a loss for words never have I had this much trouble with samba on my VM.

I looked threw other posts for a solution but none fit the bill. I made sure all the folders had execute permissions for anyone, I tried doing chmod 777 /media/pi/storage/kevin, tried nobody as owner, added security = user and wins support = yes in [global].

tl;dr: With the current settings I can access "share" just fine but, if I try to make it only for valid users it doesn't prompt me to login and says I don't have permission. Pihome prompts me for login but even with correct conditionals tells me I don't have permission.

Code: Select all

[share]
Comment = kevin's storage
Path = /media/pi/storage/kevin
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes

[pihome]
   comment= Pi Home
   path=/home/pi
   valid users = pi
   browseable=Yes
   writeable=Yes
   only guest=no
   create mask=0777
   directory mask=0777
   public=no
Thank you.
Last edited by _Doc on Mon Dec 31, 2018 9:53 pm, edited 1 time in total.

andrum99
Posts: 1239
Joined: Fri Jul 20, 2012 2:41 pm

Re: Samba acting unusual with Raspbian

Sun Dec 30, 2018 12:31 pm

You have some minor errors in your configuration:

1. You don't need both 'guest ok' and 'public' - they mean the same thing.

2. You don't need WINS support. (I'm not sure why anyone would want to use this nowadays - Windows has been using DNS for years).

However, that shouldn't cause the problem you are experiencing. Did you completely disconnect your Windows machine from all shares on the Pi before you tried connecting to the share with the 'kevin' user? To be sure all connections have been dropped, disconnect all shares then reboot the Windows machine.

hortimech
Posts: 431
Joined: Wed Apr 08, 2015 5:52 pm

Re: Samba acting unusual with Raspbian

Sun Dec 30, 2018 1:53 pm

Do not read the rpi Samba documentation, it is wrong.

Go and read this:

https://wiki.samba.org/index.php/Settin ... one_Server

_Doc
Posts: 4
Joined: Sat Dec 29, 2018 6:22 pm

Re: Samba acting unusual with Raspbian

Sun Dec 30, 2018 2:56 pm

andrum99 wrote: You have some minor errors in your configuration:
1. You don't need both 'guest ok' and 'public' - they mean the same thing.
2. You don't need WINS support. (I'm not sure why anyone would want to use this nowadays - Windows has been using DNS for years).
However, that shouldn't cause the problem you are experiencing. Did you completely disconnect your Windows machine from all shares on the Pi before you tried connecting to the share with the 'kevin' user? To be sure all connections have been dropped, disconnect all shares then reboot the Windows machine.
Okay so it is on the Windows side. I was able to access the Pihome from my laptop(Not sure why I didn't think to try that first). I ran "net use" but there is no connections listed even tried "net use * /del" to delete all connection yet that did naught. I also tried to restart my computer but just like the others it did not work.
hortimech wrote: Do not read the rpi Samba documentation, it is wrong.
Go and read this:
https://wiki.samba.org/index.php/Settin ... one_Server
Thanks make the config look a lot nicer and it explains the variables better then other ones I have read.


Not sure why it was not working at first but after I logged in to my samba share from my laptop and logged off I was able to access it from my desktop.

Return to “Troubleshooting”