Dariem PĂ©rez Herrera
2008-Nov-16 09:41 UTC
[Samba] How to share [homes] in a more flexible way?
Hello everybody, This is the scenario I have: I've joined a GNU/Linux machine to an Active Directory domain using winbind, and I've shared [homes], so now every user of the entire organization were I work can see a shared resource named like his/her username when they connect to that PC, but I don't want that, I just want the people from my department to see their homes (they are the only users who can access that machine by connecting to Samba, because I've specified valid users in [homes], but keeping visible homes for the rest of the users in the organization can bring me some trouble with personnel asking why their usernames appear naming a shared folder on an unknown machine in a remote department). I've attempted various approaches but I've failed to achieve my goal, so I wonder if it's even possible. Sharing homes one-by-one is out of question: too many people in my department. Can you help me? best regards, Dariem
On 11/16/2008, Dariem P?rez Herrera (dariemp@uci.cu) wrote:> I just want the people from my department to see their homes (they > are the only users who can access that machine by connecting to > Samba, because I've specified valid users in [homes], but keeping > visible homes for the rest of the users in the organization can bring > me some trouble with personnel asking why their usernames appear > naming a shared folder on an unknown machine in a remote department).It sounds like you might be wanting: hide unreadable = Yes in the [homes] share section? -- Best regards, Charles
Hello, Am Sonntag, 16. November 2008 10:23 schrieb Dariem P?rez Herrera:> Hello everybody, > This is the scenario I have: I've joined a GNU/Linux machine to an > Active Directory domain using winbind, and I've shared [homes], so now > every user of the entire organization were I work can see a shared > resource named like his/her username when they connect to that PC, but > I don't want that, I just want the people from my department to see > their homes (they are the only users who can access that machine by > connecting to Samba, because I've specified valid users in [homes], but > keeping visible homes for the rest of the users in the organization can > bring me some trouble with personnel asking why their usernames appear > naming a shared folder on an unknown machine in a remote department).> I've attempted various approaches but I've failed to achieve my goal,Have you tried the following options? browseable = no # and / or valid users = %S> best regards, > Dariemregards Thomas -- Thomas Flaig mailto: thomas.flaig@unibw.de
Alex Harrington
2008-Nov-17 11:34 UTC
[Samba] How to share [homes] in a more flexible way?
> I've attempted > various approaches but I've failed to achieve my goal, so I > wonder if it's even possible. Sharing homes one-by-one is out > of question: too many people in my department. Can you help me?Assuming all the people in your department are in a group, you can just include a separate configuration based on group membership: Eg: In smb.conf: include = /etc/samba/%G_smb.conf For your group, you should then create /etc/samba/mygroup_smb.conf: [homes] comment = Homes browsable = no valid users = %S path = %H Etc etc etc You might have problems with this if your department group is not your primary group membership... Alex -- Alex Harrington - Network Development Manager Longhill High School t: 01273 391672 e: alex@longhill.org.uk
If your users are seeing folders other than their own under "homes", it means that you made some mistake with the configuration, probably with the path directive to homes. That is NOT the normal behavior. You still didn't show us your [homes] entry in smb.conf...