You can use the
smbstatus command to get a list of current Samba connections (processes, shares and locks). However if you're looking for the user who has a specific file open, then first you've to look for a lock in the lock list (
smbstatus --locks), then you've to look up the username for the given PID in the process list (
smbstatus --processes). I've made a script that uses awk to process the output of smbstatus and print the name of the user who keeps opened the file specified in the parameters.
Recent comments
6 days 15 hours ago
1 week 13 hours ago
1 week 15 hours ago
1 week 1 day ago
1 week 1 day ago
1 week 5 days ago
1 week 5 days ago
3 weeks 3 days ago
3 weeks 3 days ago
3 weeks 5 days ago