Is there a practical way, e.g. net command or other cli to get a list of all shares defined on a Linux server (Ubuntu distribution) listing not only the share name but also the full path to the local shared directory? Without having to look at samba config files or user shares files.
No, you cant
Shows the shares, but you have to look this up in your smb.conf to find the path.
Try this script ... feel free to improve it
#!/bin/bash while read line; do [[ "$line" =~ ^\[ ]] && name="$line" [[ "$line" =~ ^[[:space:]]*path ]] && echo -e "$name\t$line" done </etc/samba/smb.conf
Yes, you can.
The solution (found thanks to http://ubuntuforums.org/showthread.php?t=1304277&p=8186452#post8186452) is to look at the directory
/var/lib/samba/usershares : it contains one file per share, and each file has a line starting with
path= containing the local path