[Samba] Bash question about find out all accessible shares on Samba server

J Gao jgao at veecall.com
Mon Dec 17 15:29:42 MST 2012


Hello,

I am working on a bash script to help user mount Samba share on his/her 
local Linux (Ubuntu) system. Now I can list all the Samba shares by command:

#smbclient -N -gL \\sambaserver 2>&1 | grep -e "Disk|" | cut -d'|' -f2

The problem is we have too many shares on the server so this come out a 
very long list of all the shares. Now I only want to list the user 
accessible shares and hide all others. I can use "read" to get user's 
login name/password for Samba authorization. Is there a way I can get 
the share list based on user's permission?

Thanks for help.

Gao

-- 



More information about the samba mailing list