Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.protocols.nfs Subject: Re: Querying servers for importable file systems Message-ID: <1991Jun22.075547.6218@Think.COM> Date: 22 Jun 91 07:55:47 GMT References: <4528@borg.cs.unc.edu> Sender: news@Think.COM Reply-To: barmar@think.com Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 26 In article <4528@borg.cs.unc.edu> menges@menges.cs.unc.edu (John Menges) writes: >Has anyone written a program that given a server name will query the >server and return the names of the file systems my host is allowed to >mount from that server? There must be a way to do this since >automounter does something similar, but I'd like to avoid figuring out >how to make the necessary RPC call(s). On SunOS and Ultrix, "/usr/etc/showmount -e " will display the export list of . It includes file systems you don't have access to, so you'd have to use awk, perl, or something like that to restrict it to the accessible file systems. >In case it matters, the servers are SunOS and Ultrix (mostly) and my >hosts are AIX RS_6000s and RTs running mach (the latter without >automounter... sigh). I don't know whether AIX or Mach have showmount. But I think it's available in the public BSD sources. You should be able to modify it to discard inaccessible file systems pretty easily. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar