7

From the command-line, I need to list all the AFP shares available from a given server on a local network.

I can browse the available servers that provides AFP as follow:

iMac:bin me$ dns-sd -B _afpovertcp._tcp
Browsing for _afpovertcp._tcp
Timestamp     A/R Flags if Domain                    Service Type              Instance Name
10:36:36.531  Add     3  4 local.                    _afpovertcp._tcp.         iMac
10:36:36.547  Add     3  5 local.                    _afpovertcp._tcp.         iMac
10:36:36.547  Add     3  4 local.                    _afpovertcp._tcp.         box
10:36:36.547  Add     2  5 local.                    _afpovertcp._tcp.         box
^C

And now I want to know what shares are available from "iMac" for instance (the ones that are displayed by the Finder when you clic on the server icon in the "Shares" left-column view) ?

PS I already found many threads about this (here and here), but they are unanswered for this specific topic.

Community
  • 1
  • 1
Christophe
  • 216
  • 1
  • 3
  • 12

3 Answers3

2

Have alook at this one:

https://nmap.org/nsedoc/scripts/afp-showmount.html

I could get the info about available afp-shares with nmap...

My command:

nmap -p 548 --script afp-showmount --script-args afp.username=yourusername,afp.password=yourpassword yourserveraddress

0

I ended up here looking for this answer:

sudo sharing -l
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
Tareq Saif
  • 19
  • 2
-1

Well, either you want the list of the mounted afp shares, then you can issue a mount command and you will get something like:

//someUser@someServer._afpovertcp._tcp.local/path on /Volumes/path (afpfs, nodev, nosuid, mounted by someUser)

Or you want to know what shares could be available for mounting… and unfortunately that's not easy since you first need to log in as a user to list the available shares for you to mount. Different users may see different shares for the same server.

Jean
  • 7,623
  • 6
  • 43
  • 58