Being an evil CIFS admin

Status
Not open for further replies.

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I have some users who routinely open files, lock their workstations, and leave the office. In some situations another user needs write-access to the file.

I know that I can use smbstatus to find and kill the PID associated with the annoying user's samba session and release the oplock on that particular file. This has the semi-unfortunate side-effect of killing the user's entire session. Is there a way to do this for only a single file?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not easily, no. Killing the PID is the only way I know of to solve resolve the problems with these pesky users.

Another way is to find out if they need write access to the file. If they open it only to look then give them read-only permissions. Then they can look without locking the file.
 

socos

Dabbler
Joined
Aug 30, 2014
Messages
11
If your FreeNAS server is joined to an Active Directory domain you could try managing the FreeNAS in Computer Management.

Open compmgmt.msc, right click the 'Computer Management (Local)', Connect to another computer, enter your FreeNAS hostname, click OK. You may get an ugly Firewall error dialog saying to enable certain rules (it tells you which ones to enable).

After that, navigate to: System Tools > Shared Folders > Open Files. Look for the file in question, right click it and then 'Close Open File'.

Not sure if this works on FreeNAS, but it has worked for me on NetApps in the past.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
If your FreeNAS server is joined to an Active Directory domain you could try managing the FreeNAS in Computer Management.

Open compmgmt.msc, right click the 'Computer Management (Local)', Connect to another computer, enter your FreeNAS hostname, click OK. You may get an ugly Firewall error dialog saying to enable certain rules (it tells you which ones to enable).

After that, navigate to: System Tools > Shared Folders > Open Files. Look for the file in question, right click it and then 'Close Open File'.

Not sure if this works on FreeNAS, but it has worked for me on NetApps in the past.

Thanks. I can confirm that this works in an AD environment.
 
Status
Not open for further replies.
Top