How to hide CIFS shares from certain computers?

Status
Not open for further replies.

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Hello. The title says it all really. I would like to hide my CIFS share from certain computers, either via mac or IP address?

Can anyone help?

Thanks
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
AFAIK there isn't a way to hide shares from certain computers.
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Arh that's not what i wanted to hear.

If that's the case, is there anyway to disable CIFS compatibility in OS X? The problem I'm having is seeing my shares appear twice in OS X.
 

cmanderson

Cadet
Joined
May 25, 2013
Messages
3
Can you name your shares with a "$" appended, such that they're hidden entirely, then on those computers you need to access them, map directly to the hidden share?
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Can you name your shares with a "$" appended, such that they're hidden entirely, then on those computers you need to access them, map directly to the hidden share?

That sounds like a good solution. How would i do that?

Thanks,
Chris.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
He told you how... Append a $ to the end of your share name...
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
That's generally the way to do it on windows.

With freenas, why not just uncheck the "browsable to network clients" option? This simply sets "browseable = no" in smb.conf for the share in question. You have to know the share is there to connect to it.

I didn't mention it before, because that makes it 'hidden' to all network clients, not only some. I'm unaware of how to selectively hide shares from some clients, but not others. Samba is quite complex, so there may be a way to do it.
 

Chris230291

Patron
Joined
Mar 21, 2012
Messages
300
Thanks for the replies but it doesn't seem to work?

I have tried naming my CIFS share "Server$", and my individual shares in it "Media$", "Software$" ext. I have also tried unchecking "browsable to network clients" but I still see the shares in OS X though.

Any ideas?
Chris.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Did you try restarting the service after the changes?
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
I don't know how os x works. Once you've browsed to a certain share, even after hiding it, it may still know it's there, and attempt to connect to it anyway.

I know the option 'browsable to network clients' works when unchecked. I have a share of the root pool with that unchecked, so that it's not visible on the network. Normally I access shares of datasets, but sometimes it's easier to access the root pool. Since the share is not visible, nobody but me knows it's there.

Like cyberjock says, make sure you restart cifs after making changes, just to be sure.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I could be wrong, but I thought that the trick with the $ was a Windows thing where Windows would hide it, but it wasn't truely hidden, it was a client side thing.
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
Ahh, yes, you're probably right. The share$ thing is probably client side.

Whereas I know "browseable = no" works in samba, as is therefore by definition, a server side option.
 
Status
Not open for further replies.
Top