Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

if for example i have a word document open on a winxp machine via a samba connection, then what command at linux level can i use to find what processes have the file open, so i can kill them, also how can i kill a specific samba user. In my example if i do lsof|grep , then kill the processes that contain the file name, it looks like linux does not think the file is open, but at the windows machine i do not lose connection to the samba connection, so the windows machine thinks all is ok, so if i copied the file in question from a different machine to the server, then the orginal windows machine does a save, it would wipe out my copy, how from the linux machine can i kill the samba process for that user so they can not save that file that they have opened that i closed at linux level.

share|improve this question

migrated from stackoverflow.com Mar 2 '10 at 17:12

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

You can use smbstatus to list out the processes:

$ smbstatus -p

Samba version 3.0.33-0.18.el4_8.1
PID     Username      Group         Machine                        
-------------------------------------------------------------------
 9672   george        george        gb           (192.168.2.41)
14452   andrew        andrew        dev          (192.168.11.6)
17282   bob           bob           abcde        (192.168.2.11)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.