Hello, it's probably somewhat off-topic, but I need to automate mounting shares which are dynamically created on a samba server. I can use "smbclient -L <server>" to grab that list, however its output isn't easily parseable. I had a look in the samba tools and found nothing of relevance. Is there a recommanded way to get the list of shares from a remote server programmatically? cheers -- ------------------------------------------------------------------------ Emmanuel Florac | Direction technique | Intellique | <eflorac at intellique.com> | +33 1 78 94 84 02 ------------------------------------------------------------------------ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 163 bytes Desc: Signature digitale OpenPGP URL: <http://lists.samba.org/pipermail/samba/attachments/20201209/d302996c/attachment.sig>
Does 'net rpc share list' meet your needs? -A On Wed, Dec 9, 2020 at 3:27 PM Emmanuel Florac via samba < samba at lists.samba.org> wrote:> Hello, > > it's probably somewhat off-topic, but I need to automate mounting > shares which are dynamically created on a samba server. I can use > "smbclient -L <server>" to grab that list, however its output isn't > easily parseable. > > I had a look in the samba tools and found nothing of relevance. > > Is there a recommanded way to get the list of shares from a remote > server programmatically? > > cheers > -- > ------------------------------------------------------------------------ > Emmanuel Florac | Direction technique > | Intellique > | <eflorac at intellique.com> > | +33 1 78 94 84 02 > ------------------------------------------------------------------------ > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >
On Wed, Dec 9, 2020 at 6:27 PM Emmanuel Florac via samba <samba at lists.samba.org> wrote:> > Hello, > > it's probably somewhat off-topic, but I need to automate mounting > shares which are dynamically created on a samba server. I can use > "smbclient -L <server>" to grab that list, however its output isn't > easily parseable.However you get the list, can I encourage you to use something like "autofs" to pipe the names of the shares and their mountpoints into a configuration that makes them automatically available and unmounts them gracefully when no one is using them?> I had a look in the samba tools and found nothing of relevance. > > Is there a recommanded way to get the list of shares from a remote > server programmatically? > > cheers > -- > ------------------------------------------------------------------------ > Emmanuel Florac | Direction technique > | Intellique > | <eflorac at intellique.com> > | +33 1 78 94 84 02 > ------------------------------------------------------------------------ > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba