NFS SMB Share Lister
Script for listing NFS and SMB shares on a local NAS
About This Project
NFS-SMB-Share-Lister is a Python command-line utility that connects to a network-attached storage device on the local network and enumerates its available NFS exports and SMB shares. The tool prompts interactively for the NAS IP address, credentials, and an output destination, tests connectivity to the device, and then writes the results to a timestamped folder containing separate CSV files for SMB and NFS shares. The SMB output includes share name, UNC path, share type, comments, and a hidden-share flag, while the NFS output includes export name, server path, allowed clients, and full mount path.
The project relies on the pysmb and smbprotocol libraries for SMB/CIFS access, the optional python-libnfs library for NFS, and paramiko for SSH-based features. On Linux, NFS discovery depends on the nfs-common package and its showmount utility. The repository includes setup and run scripts for Linux as well as manual installation instructions for Ubuntu, Debian, CentOS, RHEL, and macOS. The README documents that the project was developed with AI assistance and links to the original development prompt.
The tool is useful for system administrators and home lab users who need an inventory of shares on consumer or prosumer NAS devices such as Synology, QNAP, TrueNAS, and similar Linux-based systems. Exported CSV files can serve as documentation of network storage configuration or as input to further auditing and reporting workflows.