Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been trying to setup my samba shares correctly.

The setup i was looking for was having a couple of shares available publicly, guest accounts are ok and can browse these shares all ok. I have this setup correctly.

The problem comes when setting up a share that only certain users can view, although i have setup a share that will only allow certain users to access. I havent been able to hide this share from guests.

I had a look into the browseable = yes option but this hides it from everyone, including the users that have logged in.

Any idea on how to tackle this?

The setup i have for this private share is follows:

[private]
comment = private share for certain users
path = /media/drive/private
create mask = 0777
directory mask = 0777
writable = yes
public = no
users = admin

I currently have

security = share

But have tried using browseable = no with

security = user
share|improve this question
add comment

3 Answers

You may use 'include' directive inside share definition section.

For example: 'smb.conf':

security = user

[private]
...
browseable = no
...
include = /etc/samba/per-user-config/%u.conf

'allowed-user.conf':

browseable = yes

Please refer Samba official docs for more info and variables: http://www.samba.org/samba/docs/using_samba/ch06.html

share|improve this answer
    
I can't believe that it seems to be the only viable solution for this problem. –  yacoob Mar 12 '13 at 1:27
    
Or perhaps set browseable = yes on the share, and then include guest.conf with browseable = no ? –  Matt Sep 13 '13 at 1:33
add comment

Why don't you use browseable = no and a logon script (if you're on a domain) that does map the hidden share to a disk (net use)?
Never tried but should work

share|improve this answer
add comment

This can be done by setting the browsable = no option in the samba share.

share|improve this answer
1  
This hides it from the browse list, even when logged in as authorized user. –  karlbright May 22 '10 at 7:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.