Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

samba share?

Status
Not open for further replies.

pichi

Programmer
Nov 12, 2000
156
0
0
EC
hi everybody i want to share a dir with smb, the dir is located at /home/one, i want to share this dir to three of my ten users, but i want my other 7 users not to see this dir, can i do that? i only want the users with access to see it, so the others won't try to access it.
thanks in advance

Pichi
 
I don't think there's a way to prevent the 7 from seeing it. I haven't tried this lately, but in the old days of windows, you could hide a share by adding $ to the end of the share name. I don't know if this will work with Samba, but it's worth a shot. Something like:
Code:
[thefolder$]
browseble=yes
#more stuff

If this works, then nobody will see it (assuming windows clients) even though it's still there. Your clients can map a drive letter to the folder named thefolder$ and you'll be all set.........if it works.

 
If you mean Windows users, then you can use a file called "usermap" which can contain the windows user login name mapped to unix login account.

Supposing, the file name is user_map, then in smb.conf file, you need to have 'username map=user_map'.

Suppose, you have user_1, user_2, ..., user_10 windows users. Create three unix accounts say, user_1_unix, user_2_unix, user_3_unix.

In the user_map file, add three lines
user_1 = user_1_unix
user_2 = user_2_unix
user_3 = user_3_unix

Set 'security=server' and 'password server=<windows-pdc-server' in smb.conf file.

After login to windows domain, three windows users can access the share on Linux from Network Neighbourhood on behalf of the corresponding Linux user that has been mapped in the user_map file. Other windows users cannot.

Hope it helps.

Soumen Ghosh
 
thank for your replys, but to sghosh83, i think you didn´t understand correctly, i have already create ten users in samba, so the ten users can access their own home directories, and other dirs that i have created, but i want to create a new dir, that only three users can see the icon of the directory, like the home dir, when i connect with a user1 i only see the user1 home dir, and i don´t see the other users dirs, i want exactly the same with a new one dir, i want 3 users to see it, and the other not,
hope there is a way

thanks in advance
 
I just tested this and it seems to work with an XP client in a workgroup environment. You can access the hidden folder with a mapped drive or by \\servername\sharename$. Here's what I added to samba.conf:

[test$]
comment = This is only a test
writeable = yes
path = /var/tmp
 
This is what I've done to accomplish something similar.
In each of these users' home directories, I created a symlink to the dir, in your case /home/one. I then set the permissions accordingly.
It works fine, but may not be what you're after. //Daniel
 
You can easily assign specific users write and read
privileges with either security(user/share) for specific
shares.
Please rtfm.
 
Hello,

In this case, I guess your authentication mechanism should be &quot;security = user&quot;. In that case, you can create a new unix account, a new unix group, add newly created account to that group and set the directory's permission to that user and group.
Three users, on trying to access that directory, will have to provide username and password. If they provide username and password of the new user created, they can access the directory.

Hope it helps.

Soumen Ghosh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top