Samba kill the locked files from a useraccount by multiple smbd pids

 
Thread Tools Search this Thread
Special Forums IP Networking Proxy Server Samba kill the locked files from a useraccount by multiple smbd pids
# 1  
Old 05-15-2014
Samba kill the locked files from a useraccount by multiple smbd pids

Details Samba server:

Release: 5.10
Kernel architecture: sun4u
Application architecture: sparc
Hardware provider: Sun_Microsystems
Kernel version: SunOS 5.10 Generic_142909-17

Samba version:
Samba version 3.5.6

Smb.conf file section Global:
# smb.conf for Airbus Industries fuer Cluster caxhh926/caxhh927
# Version 1.0
#
# Global parameters
#
[global]
#
# Domain settings
#
workgroup = EU
netbios name = caxhhpnfs05
server string = caxhhpnfs05
security = DOMAIN
encrypt passwords = Yes
password server = de0-dc01.eu.airbus.corp, de0-dc02.eu.airbus.corp, de0-dc03.eu.airbus.corp, fr0-dc01.eu.airbus.corp
password level = 6
username level = 6
lanman auth = No
# ntlm auth = No
log level = 3
max log size = 500
syslog = 0
debug uid = Yes
min protocol = COREPLUS
lm announce = No
preferred master = No
local master = No
domain master = No
browse list = no
enhanced browsing = No
dns proxy = No
wins server = 44.191.123.130 44.191.124.130
wins support = No
create mask = 0660
directory mask = 0770
case sensitive = No
default case = lower
preserve case = Yes
short preserve case = Yes
hide files = /lost+found/
hide dot files = Yes
unix charset = ISO8859-15
display charset = ISO8859-15
dos charset = cp850
map readonly = permissions
socket options = TCP_NODELAY SO_KEEPALIVE
deadtime = 15
interfaces = caxhhpnfs05/255.255.248.0
bind interfaces only = Yes
name resolve order = host wins bcast
#
# Samba directories
#
pid directory = /CCDDB.admin/samba/config/caxhhpnfs05/var/locks
log file = /CCDDB.admin/samba/config/caxhhpnfs05/logs/log.%m
smb passwd file = /CCDDB.admin/samba/config/caxhhpnfs05/private/smbpasswd
private dir = /CCDDB.admin/samba/config/caxhhpnfs05/private
lock dir = /CCDDB.admin/samba/config/caxhhpnfs05/var/locks

smbstatus command:
/usr/local/samba/bin/smbstatus -s /CCDDB.admin/samba/config/caxhhpnfs05/lib/smb.conf | more
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: rlimit_max (256) below minimum Windows limit (16384)
params.cSmiliem_process() - Processing configuration file "/CCDDB.admin/samba/config/caxhhpnfs05/lib/smb.conf"
Processing section "[global]"
Processing section "[scmondir]"
Processing section "[CCDDB]"
Samba version 3.5.6
PID Username Group Machine
-------------------------------------------------------------------
29229 th89cr th89 hall900067024 (44.165.250.97)
10690 th89bu th89 hall900058297 (44.128.221.224)
22706 th89bu th89 hall900058297 (44.128.221.224)


Problem:
This is the way which allows to identify the locked files from a useraccount by multiple smbd pids (first column)

root@caxhh938:/root > ypcat passwd|grep th16fn
th16fn:xxxxxx:29670:10016:HAM NICOLA FINK:/home/th16fn:/bin/ksh
root@caxhh938:/root > /usr/local/samba/bin/smbstatus -s /CCDDB.admin/samba/config/caxhhpnfs05/lib/smb.conf -L |grep 29670
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: rlimit_max (256) below minimum Windows limit (16384)
params.cSmiliem_process() - Processing configuration file "/CCDDB.admin/samba/config/caxhhpnfs05/lib/smb.conf"
Processing section "[global]"
Processing section "[scmondir]"
Processing section "[CCDDB]"
8659 29670 DENY_NONE 0x81 RDONLY NONE /CCDDB.auto .LINKS Wed May 14 12:34:10 2014
8957 29670 DENY_NONE 0x81 RDONLY NONE /CCDDB.auto .LINKS Wed May 14 12:42:14 2014
3865 29670 DENY_NONE 0x81 RDONLY NONE /CCDDB.auto .LINKS Wed May 14 14:14:02 2014
5611 29670 DENY_NONE 0x81 RDONLY NONE /CCDDB.auto .LINKS Wed May 14 16:04:40 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/preview/a000-84188_25f01_10.png Wed May 14 12:41:53 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/preview/a000-84188_25f01_si.png Wed May 14 12:41:55 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/preview/a000-84188_04ss01_17.png Wed May 14 12:41:51 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/a000-84188_04nn01_17.cdd Wed May 14 12:41:50 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/a000-84188_04ss01_17.cdd Wed May 14 12:41:51 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/a000-84188_04ssc01_1.cdd Wed May 14 12:41:52 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/a000-84188_04zz01_17.cdd Wed May 14 12:41:53 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/a000-84188_25f01_10.cdd Wed May 14 12:41:54 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/a000-84188_25f01_si.cdd Wed May 14 12:41:55 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/preview/a000-84188_04ff01_17.png Wed May 14 12:41:46 2014
8659 29670 DENY_NONE 0x100081 RDONLY NONE /CCDDB.auto . Wed May 14 12:34:02 2014
8957 29670 DENY_NONE 0x100081 RDONLY NONE /CCDDB.auto . Wed May 14 12:42:14 2014
3865 29670 DENY_NONE 0x100081 RDONLY NONE /CCDDB.auto . Wed May 14 14:14:01 2014
5611 29670 DENY_NONE 0x100081 RDONLY NONE /CCDDB.auto . Wed May 14 16:04:39 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/preview/a000-84188_04nn01_17.png Wed May 14 12:41:50 2014
8957 29670 DENY_NONE 0x20089 RDONLY EXCLUSIVE+BATCH /CCDDB.auto aw/aw-000/80000/preview/a000-84188_04ssc01_1.png Wed May 14 12:41:52 2014
root@caxhh938:/root >

Question:
How to do to kill the locked files from a useraccount by multiple smbd pids automatically when the session is closed ?






Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to kill printer PIDs except the spooler PID?

First of all, I'd like to congratulate this big family and all members for all the work you do! I'm trying to do an script or sentence which kills an specific printers PIDs: all printers PIDs older than 72h running in the server. Steps: 1.- List all printers PID sorting by date: ps... (6 Replies)
Discussion started by: djflu
6 Replies

2. Shell Programming and Scripting

How to kill the process when the file is locked?

I was trying to read the file to create a table in SAS and I got error as follows while I read. Resource is write-locked by another user. File =/usr/sas/sas_config/Lev1/SASApp/StoredProcessServ​er/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log. System Error Code = 0. ERROR: File is in... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies

3. Shell Programming and Scripting

Need help to kill pids

Hi there !!! I am writing a script to kill the pids on different linux boxes :cool: the output of my command gives the pids running on that box, but how can I kill all the pids without looping? :confused: Code: ssh $i ps -fu $USER | grep ManServer | grep -v grep | awk '{print $2}' | kill ... (4 Replies)
Discussion started by: prany_cool
4 Replies

4. Shell Programming and Scripting

kill multiple processes by name

Want to kill multiple processes by name. for the example below, I want to kill all 'proxy-stagerd_copy' processes. I tried this but didn't work: >> ps -ef|grep proxy_copy root 991 986 0 14:45:34 ? 0:04 proxy-stagerd root 1003 991 0 14:45:49 ? 0:01... (2 Replies)
Discussion started by: catalinawinemxr
2 Replies

5. AIX

Find all locked files

How to can find all locked files and release the locks in Unix? We have an issue were an ftp job lands files under /home/loginid at 5:30 pm and at 6 pm we run a get file on the mvs mainframe machine ftp the file from the server to the mainframe. We get an error file is in use eventhu it is not !!... (4 Replies)
Discussion started by: mrn6430
4 Replies

6. UNIX for Dummies Questions & Answers

I have files that are locked up...

Here's the story: I had an LaCie Internet Space (1TB)... Recently the network (or software) functions of the device just died... I tried to access it via different routers, checking UTP, tried everything possible to rule out physical damage to components. Then i got the disk out of its... (2 Replies)
Discussion started by: SentinelX
2 Replies

7. Shell Programming and Scripting

Track and kill the PIDS

I have a script that conducts some SSH calls and I would like to capture the child info so that I can do a sleep and then a cleanup to make sure they do not stay out there as ghosts. I was told I could do something like this... #!/bin/sh for m = job1, job2, job3 x=1... (4 Replies)
Discussion started by: LRoberts
4 Replies

8. Shell Programming and Scripting

kill multiple instances of the same program

Hi, I know that the answer to this is very simple, since I saw somebody do it some time back..but I forgot how. The problem is, I have multiple instances of the same program running simultaneously and I want to kill them all in a single command. I know that it can be done using awk '{print... (12 Replies)
Discussion started by: ipzig
12 Replies

9. UNIX for Dummies Questions & Answers

How do i kill -9 multiple processors at once

Hi There How do i kill multiple processors on unix version 5.05, I know how to kill a single processors individually (e.g kill -9 process number),but i need to do it daily as some users dont log off the systems and keeps processor's running, and when the night jobstream executes it falls over... (7 Replies)
Discussion started by: esh
7 Replies

10. UNIX for Dummies Questions & Answers

deleting locked files

I have some locked files ( locked via the Mac finder) I have tired rm -R and rm -rdf but it doesnt delete the locked files just says "override rw------- etc?" type "yes" and says "operation not permitted" is there some way to do this (or unlock the files) Thanks (1 Reply)
Discussion started by: Aussie John
1 Replies
Login or Register to Ask a Question