LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   smb.conf having share names ending in "$" (https://www.linuxquestions.org/questions/linux-server-73/smb-conf-having-share-names-ending-in-%24-626739/)

the_imax 03-09-2008 04:21 AM

smb.conf having share names ending in "$"
 
In windows If you put a $ at the end of a share than it becomes hidden,

is this also true for samba ? i.e. if we put a $ at the end of a share name in smb.conf than it will become hidden

jschiwal 03-09-2008 04:34 AM

Yes in a way. Look in your smb.conf file. You may have a [printer] service.

There is the "browseable = No" option that you set to hide the service from the browser. From another linux computer on the LAN run "smbclient -L <hostname>" to print out the services. Notice the "printer$" service.

Here you can try it out for yourself.
1) Create two directories to share:
sudo mkdir -P /srv/samba/{public,secret}
sudo chmod a=rwxt /srv/samba -R

Add this to the smb.conf file. Then run "testparm to test your smb.conf file.
Code:

[public]
        comment = Public Share test
        path = /srv/samba/public
        read only = no
        guest ok = yes
        browseable = Yes
[secret]
        comment = secret share
        path = /srv/samba/secret
        read only = no
        guest ok = Yes
        browseable = No

3) Restart the samba services (smbd, nmbd).

Now browse to this computer from another computer on the LAN.

You may need to restart the client browser to dump any name caching in the client.

the_imax 03-09-2008 08:55 AM

Thanks, I suppose that both the "browseable" and including $ at the end of share name in smb.conf serve the same purpose

as mentioned here
http://www.cae.wisc.edu/site/public/...title=linbegin

jschiwal 03-11-2008 05:50 AM

Just adding the "$" character, I was able to browse to the "secret$" share. Using both, the $ was required to be entered as the name. So just use "browseable = No". That's what it is for.


All times are GMT -5. The time now is 02:18 PM.