A Script to Tell Which Workstations are Using Samba Shares

“A combination of Linux utilities can help you determine who on
your network is using which of your shared filesystems at any given
time, allowing you to ask those users to log off while you update
the system.

“One of my clients has many multiple small Visual Basic 6 and
Access-based applications running directly on Linux via Samba
through network shares on Windows XP clients. Whenever he needs to
update the application or database, he asks the users to log off
the application so he can upload the new binary application or
Access file to the server…”