LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-08-2011, 05:28 AM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Rep: Reputation: 18
how to hide samba shares from invalid users


hello
I would like to know how can I share folder with samba that samba does not show it to those users that have no access to it?

thanks.
 
Old 06-08-2011, 06:29 AM   #2
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
Might Try smb.conf

Code:
[TheShare]
   ...
   hide unreadable = yes
perhaps?

Another method I have used is to set the share invisible, then mount it via scripts for those that have access. Now if those without access attempt to use it it fails, but most won't see it since Windows won't show it by default.
 
Old 06-11-2011, 12:25 PM   #3
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Original Poster
Rep: Reputation: 18
unfortunately it did not work.
my configuration is:
Quote:
[global]
workgroup = workgroup-DOMAIN
netbios name = workgroup
server string = workgroup File Server
enable privileges = yes
interfaces = lo,eth0,tap0
bind interfaces only = Yes
passdb backend = ldapsam:ldapi://%2fvar%2frun%2fslapd%2fldapi
ldap ssl = Off
log level = 1
syslog = 0
log file = /var/log/samba/%m
max log size = 50
vfs objects = full_audit
full_audit:success = connect opendir open disconnect unlink mkdir rmdir rename
full_audit:failure = none
smb ports = 137 138 139 445
name resolve order = wins bcast hosts
time server = Yes
printcap name = CUPS
wins support = Yes
dns proxy = Yes
ldap suffix = dc=RAAD,dc=raad,dc=com
ldap machine suffix = ou=Computers
ldap user suffix = ou=Users
ldap group suffix = ou=Groups
ldap idmap suffix = ou=Idmap
ldap admin dn = cn=ebox,dc=RAAD,dc=raad,dc=com
map acl inherit = Yes
printing = cups

[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
vfs objects = full_audit recycle
recycle: versions = Yes
recycle: repository = /home/.Recycles/%U/%I_%S_%T_RecycleBin
recycle: keeptree = Yes
recycle: excludedir = /tmp|/var/tmp
recycle: directory_mode = 0700



[Archive]
comment = Archive
path = /home/samba/shares/Archive
valid users = @"Archive", @"Managers"
read list =
write list = @"Archive"
admin users = @"Managers"
read only = No
browseable = Yes
force create mode = 0660
force directory mode = 0660
vfs objects = full_audit recycle
hide unreadable = yes
recycle: versions = Yes
recycle: repository = /home/.Recycles/%U/%I_%S_%T_RecycleBin
recycle: keeptree = Yes
recycle: excludedir = /tmp|/var/tmp
recycle: directory_mode = 0700
but the other groups can see it too .

what is wrong?
 
Old 06-16-2011, 11:50 AM   #4
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
sorry for the delayed response I got busy.

Perhaps
Code:
browseable = Yes
From the smb.conf manual
Quote:
This controls whether this share is seen in the list of available shares in a net view and in the browse list.

Default: browseable = yes
Try setting
Code:
browseable = no
 
Old 06-17-2011, 12:29 PM   #5
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Original Poster
Rep: Reputation: 18
sorry browseable = no makes share hidden for all users not just for invalid users.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] samba invalid users anon091 Linux - Newbie 3 03-17-2011 11:39 AM
Samba without domain and users with domains cannot log in to the shares Maverick2k Linux - Server 2 04-08-2009 06:41 AM
Samba Shares & Users Raggit Linux - Software 4 02-14-2005 04:36 AM
samba: hide shares from some users v3rb0 Linux - Software 4 08-10-2003 01:12 AM
Users, window managers, bootloaders and samba shares (oh my!) Korff Linux - General 1 06-13-2003 11:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration