I tried to find an answer to this question, but couldnt. Im new at configuring my samba shares, so there's a lot of things I dont know about them.

Anyway, what I want to do is have a couple of public shares and one that asks for the user's password.

The problem is that when I access the public shares before the secured one, it won't grant me access, but if I access the secured one before the public ones, I dont have any kind of problem using either one.

My server is a xubuntu desktop 10.8 and my smb.conf (the shares part) is the following:

[public_html] comment = Public HTML path = /home/beanz/public_html writeable = yes browseable = yes create mask = 0777 guest ok = yes read only = no

[secure_share] path = /home/beanz/secure_share writeable = yes browseable = yes create mask = 0777 valid users = beanz read only = no guest ok = no

Any ideas on why this is happenning?

Thanks in advance!

2 Answers 2


I think I know the answer as to what is happening... (which is what your question states), however I do not know a good answer to how to fix, so maybe my answer will spur someone else on.

What I believe is happening is, when you log on to secure_share, you are effectively saving/caching a network credential which has access to both folders.

However, I am guessing that when you click on the public_html share, you are logging on as anonymous / network guest, which only has access over the public folder. This "guest" credential is effectively saved and when you then click on secure_share, you authenticate as the guest account which obviously fails.

I do not know a good way to delete cached credentials as a client (and this drives me mad when setting up secure Linux based Nass), the easiest way is to simply log off and back on.

A stab in the dark at a solution....

I am not a big expert as Linux/Samba but When I do setup Linux boxes, there is usually an option for both guest, AND unauthenticated guest. The difference being - on one, anyone with an account can connect, the other, anyone anywhere can connect.

I hope this helps.

  • pretty much what i thought, though i dont know how to erase credentials when i log in to the secure share =/ thanks for your input =)
    – dabito
    Feb 11, 2011 at 4:11
  • @dabito - As I said, there isn't a good way/quick command, the easiest way I found is simply to log off and back on again. Feb 11, 2011 at 9:37

I have some experience with samba file sharing, but not a lot. However what your server seems to be doing is tagging your desktop as a guest whenever you open guest folder. Thus, whenever you try to open one that requires you to be an actual user, you can not access it due to your tag as a guest that you were already given.

I don't know how to resolve this, but I hope that may help you.

Good luck! [When in doubt, pirate windows xp or something and set it up to share the folders..]

Also: make sure your hard drive that the shared files are coming off of have the same partition type as the ubuntu installation. Otherwise, windows computers will be unable to delete from the samba server.

OH! You should try changing your samba config file to were type = User and set up a guest account name. Example:

[global] ... security = user guest account = jon

more information here: https://askubuntu.com/questions/3986/samba-share-not-allowing-username-to-be-entered

Read that, maybe you can derive a solution. Good luck!

  • this looks promising, Ill see if this works. Thanks for your answer =)
    – dabito
    Feb 11, 2011 at 4:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .