LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-24-2014, 02:34 PM   #1
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Rep: Reputation: 26
help with samba share - browseable & valid user ?


in samba there is a default option in the gui to allow user's home directories to be shared out. it's called or named Homes.
The other is named Users but i have it disabled.
Home accounts are under /home/<username>

it works such that if i'm on my windows 7 pc logged in as 'ron' and i go to \\my_linux_machine the windows folder opens and only shows the folder 'ron' which is my home account (/home/ron) .
for other users on my_linux_machine whose account names for example are 'bob' and 'dave', if those guys log in on their windows pc and then go to \\my_linux_machine they only see their respective folders show up. When I log in as ron, i only see the 'ron' folder on the linux machine and not bob or dave.... and bob only sees bob and not ron nor dave, and so on.

for the Homes share, the options are
- browseable = No
- comment = Home Directories
- read only = No
- valid users = %S, %D%w%S
- inherit acls = Yes

now for someone on the network who doesn't have an account on my_linux_machine if they go \\my_linux_machine they see nothing... which is good.

problem is when i go to share out other folders, such as /data.
i typically only do inherit_acls, which is the default when doing a new samba share and it works fine for the most part. if someone who doesn't have an account on \\my_linux_machine goes to it, they will see that folder.... \\my_linux_machine\data... but when they try to go into it they get a pop up asking for username and password. that's good that they CANT get into it... but i would like for them not to see it in the first place if they don't have a valid samba account.

so i tried browseable = no at first, and naturally the folder disappears from view when doing \\my_linux_machine. But if you manually do \\my_linux_machine\data then you can get into it if you have a samba account. i don't want that to happen, i want it to work like the HOMES share. I also tried inserting the valid users option and mimicked the HOMES share but having no luck
I notice with the Homes share that there is no path option. confused.
 
Old 11-24-2014, 02:55 PM   #2
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Original Poster
Rep: Reputation: 26
ok it looks like the homes share is based on a service somehow and uses the valid users option.

is it possible to do what i want?

when you go to \\my_linux_machine
- if you have a valid samba account then you see what is shared.
- if you don't have a valid samba account, you see nothing shared.

in addition it would be cool to further restrict what's visible/browseable to those with valid samba accounts based on folder permissions.

is this possible to do?
thanks.
 
Old 11-24-2014, 07:43 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,689

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
homes is special whereby samba will automatically create a share using the users home directory. No path required.

This works on a per user basis.

[data]
path=/test
browseable = no
writable = yes
valid users = ron
public = no
include = /etc/samba/smb.conf.%U

smb.conf.ron
[test]
browseable = yes

Last edited by michaelk; 11-24-2014 at 09:17 PM. Reason: Additional info
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SAMBA - unix user created, added to samba, and valid users on share, still cannot... mitchell7man Linux - Server 12 03-17-2010 08:37 PM
Samba share browseable, how do I make it invisible yet accessible? mitchell7man Linux - Server 1 12-13-2009 06:59 AM
Samba guest share with valid user carlmarshall Linux - Server 7 08-07-2008 05:17 AM
Samba server not browseable on network Forwardthinking Linux - Newbie 5 12-12-2007 02:54 PM
Making Samba Share Browseable for some mindspenk Linux - Newbie 2 07-08-2004 10:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:18 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