LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2012, 12:38 AM   #16
centos123
Member
 
Registered: Apr 2011
Posts: 397

Original Poster
Rep: Reputation: 16

Quote:
Originally Posted by jsveiga View Post
Oh, I assure* it can do no harm; all it does is take the output of the smbstatus and reorganize it, grouping the information per user/client pc.

I have another script though to "kick" user connections (I named it really "kick"); you go "kick john.smith", and it finds the PIDs for the guy's samba connections/locked files, then kills them. This one does harm , but it is eventually useful (when windows/app crashes and leaves file locked in the server)

(*the assurance of a random guy in a forum means nothing, but you can read the script :-) )


can you give out put of you wrapper program...? i dont want to kill user access or lockfile.i just need information of accessing sharing dir by user...so i test for wrapper .before this can you post output.
 
Old 04-28-2012, 02:50 AM   #17
root@linux
LQ Newbie
 
Registered: Aug 2011
Location: Pakistan
Distribution: Ubuntu
Posts: 11

Rep: Reputation: Disabled
in terminal... smbstatus -s
 
Old 04-28-2012, 03:07 AM   #18
centos123
Member
 
Registered: Apr 2011
Posts: 397

Original Poster
Rep: Reputation: 16
thanks....is thier any shell programming for monitoring smb users and accessing file etc...
 
Old 04-28-2012, 08:29 AM   #19
jsveiga
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: debian on servers and embedded, kubuntu elsewhere
Posts: 31

Rep: Reputation: 1
Quote:
Originally Posted by centos123 View Post
can you give out put of you wrapper program...? i dont want to kill user access or lockfile.i just need information of accessing sharing dir by user...so i test for wrapper .before this can you post output.
sure (gee, I didn't know the guys were working on Saturday - I ran this from home...)
Code:
zulu:~# smblock
lucas.ferreira @ cetus :

21309   1057    0x20089 Y     NONE             /shared/projects   Library_CAD/Library.ipj
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/20R-Configuracao_Revestimento/1008
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/20R-Configuracao_Revestimento
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2012/2012-01_DOP_Comando_&_Controle/inv/ARMARIO
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2012/2012-01_DOP_Comando_&_Controle/inv/ARMARIO/armarios
21309   1057    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck
_________________________________________

monica.reis @ lima :

21346   1042    0x100081        Y     NONE             /shared/suprimentos   PO_2012
21346   1042    0x100081        Y     NONE             /shared/nfe   Entradas
_________________________________________
                                                                                                                                                                                   
ronaldo.andrade @ cassiopeia :                                                                                                                                                    
                                                                                                                                                                                  
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2011/2011-10_SNG_Anhanguera/inv/Sistema Antena/sistema antena 2                     
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/Componentes_Sequencias                                                 
21362   1020    0x20089 Y     NONE             /shared/projects   Library_CAD/Library.ipj                                                                                         
21362   1020    0x20089 Y     EXCLUSIVE+BATCH  /home/ronaldo.andrade   IMPRESSÃO PDF/GLOBOSAT UM6HD/10M.1024.057816_BRACO_SLD_ALIMENTADOR_SKYWARE_HPA_EXTERNO_#032071_FL05.pdf    
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2011/2011-10_SNG_Anhanguera/inv/Sistema Antena                                      
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/Componentes_Sequencias/Tubos                                           
21362   1020    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck                                                                                        
_________________________________________                                                                                                                                         

marcia.machado @ andromeda :

21376   1006    0x100081        Y     NONE             /shared/nfe   Entradas/Digitalização NF's/2012/04-Abril
21376   1006    0x100081        Y     NONE             /shared/nfe   Entradas/Digitalização NF's/2012/04-Abril/25
21376   1006    0x100081        Y     NONE             /shared/public   .
_________________________________________

erik.ferreira @ taurus :

21400   1009    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck
21400   1009    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Desenhos_Componentes/Componentes_Sequencias/Perfis/Perfil_MP_2890.ipt
_________________________________________

robson.nascimento @ apus :

21432   1039    0x100081        Y     NONE             /shared/financeiro   Fin-Tools/Banks
_________________________________________

wagner.verri @ loeb :

21436   1041    0x20089 Y     NONE             /shared/projects   Library_CAD/Library.ipj
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Itens_Comerciais/Itens_Mecanico/Porcas/Sextavada/012094_PORCA_SEXT_INOX_M6.ipt
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Itens_Comerciais/Itens_Mecanico/Arruela/Lisa/023887_ARRUELA_LISA_ACO_INOX_M6.ipt
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Desenhos_Componentes/01M-Pecas_Mecanicas/0001/01M.0001.054259_BARRA_CHATA_AL_3X1;4X1286MM_FUR.ipt
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Itens_Comerciais/Itens_Mecanico/Arruela/Pressao/011774_ARRUELA_PRESSAO_INOX_M6.ipt
21436   1041    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck
_________________________________________

pcc @ draco :

21768   1011    0x100081        Y     NONE             /shared/projects   Defesa/6.SATCOM/Manufacturers
21768   1011    0x100081        Y     NONE             /shared/projects   Defesa/6.SATCOM/Manufacturers/SISLIVE
_________________________________________

vanderlei.massarioli @ echo :

22001   1007    0x100081        Y     NONE             /shared/financeiro   Fin-Tools
_________________________________________

zulu:~#
 
Old 04-28-2012, 08:33 AM   #20
jsveiga
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: debian on servers and embedded, kubuntu elsewhere
Posts: 31

Rep: Reputation: 1
Quote:
Originally Posted by centos123 View Post
thanks....is thier any shell programming for monitoring smb users and accessing file etc...
What kind of output/monitoring do you need?

Something realtime (sort of like top does for processes), something that logs accesses to a logfile, something that sends notification emails when someone accesses specific files, etc, and which information (time + user@host + file)?

BR,

Joao S Veiga
 
Old 04-28-2012, 12:48 PM   #21
kyrunner
LQ Newbie
 
Registered: Apr 2012
Location: New York
Distribution: Centos,Debian
Posts: 29

Rep: Reputation: 1
Add this to the end of your samba share entry


vfs objects = full_audit
full_audit:failure = none
full_audit:success = mkdir rename unlink rmdir open pwrite
full_auditrefix = %u|%I|%m|%S
 
Old 04-29-2012, 10:58 PM   #22
centos123
Member
 
Registered: Apr 2011
Posts: 397

Original Poster
Rep: Reputation: 16
your program is in perl? ..





Quote:
Originally Posted by jsveiga View Post
sure (gee, I didn't know the guys were working on Saturday - I ran this from home...)



Code:
zulu:~# smblock
lucas.ferreira @ cetus :

21309   1057    0x20089 Y     NONE             /shared/projects   Library_CAD/Library.ipj
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/20R-Configuracao_Revestimento/1008
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/20R-Configuracao_Revestimento
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2012/2012-01_DOP_Comando_&_Controle/inv/ARMARIO
21309   1057    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2012/2012-01_DOP_Comando_&_Controle/inv/ARMARIO/armarios
21309   1057    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck
_________________________________________

monica.reis @ lima :

21346   1042    0x100081        Y     NONE             /shared/suprimentos   PO_2012
21346   1042    0x100081        Y     NONE             /shared/nfe   Entradas
_________________________________________
                                                                                                                                                                                   
ronaldo.andrade @ cassiopeia :                                                                                                                                                    
                                                                                                                                                                                  
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2011/2011-10_SNG_Anhanguera/inv/Sistema Antena/sistema antena 2                     
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/Componentes_Sequencias                                                 
21362   1020    0x20089 Y     NONE             /shared/projects   Library_CAD/Library.ipj                                                                                         
21362   1020    0x20089 Y     EXCLUSIVE+BATCH  /home/ronaldo.andrade   IMPRESSÃO PDF/GLOBOSAT UM6HD/10M.1024.057816_BRACO_SLD_ALIMENTADOR_SKYWARE_HPA_EXTERNO_#032071_FL05.pdf    
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Estudos/2011/2011-10_SNG_Anhanguera/inv/Sistema Antena                                      
21362   1020    0x100081        Y     NONE             /shared/projects   Library_CAD/Desenhos_Componentes/Componentes_Sequencias/Tubos                                           
21362   1020    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck                                                                                        
_________________________________________                                                                                                                                         

marcia.machado @ andromeda :

21376   1006    0x100081        Y     NONE             /shared/nfe   Entradas/Digitalização NF's/2012/04-Abril
21376   1006    0x100081        Y     NONE             /shared/nfe   Entradas/Digitalização NF's/2012/04-Abril/25
21376   1006    0x100081        Y     NONE             /shared/public   .
_________________________________________

erik.ferreira @ taurus :

21400   1009    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck
21400   1009    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Desenhos_Componentes/Componentes_Sequencias/Perfis/Perfil_MP_2890.ipt
_________________________________________

robson.nascimento @ apus :

21432   1039    0x100081        Y     NONE             /shared/financeiro   Fin-Tools/Banks
_________________________________________

wagner.verri @ loeb :

21436   1041    0x20089 Y     NONE             /shared/projects   Library_CAD/Library.ipj
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Itens_Comerciais/Itens_Mecanico/Porcas/Sextavada/012094_PORCA_SEXT_INOX_M6.ipt
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Itens_Comerciais/Itens_Mecanico/Arruela/Lisa/023887_ARRUELA_LISA_ACO_INOX_M6.ipt
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Desenhos_Componentes/01M-Pecas_Mecanicas/0001/01M.0001.054259_BARRA_CHATA_AL_3X1;4X1286MM_FUR.ipt
21436   1041    0x20089 Y     EXCLUSIVE+BATCH  /shared/projects   Library_CAD/Itens_Comerciais/Itens_Mecanico/Arruela/Pressao/011774_ARRUELA_PRESSAO_INOX_M6.ipt
21436   1041    0x2019f       NONE             /shared/projects   Library_CAD/lockfile.lck
_________________________________________

pcc @ draco :

21768   1011    0x100081        Y     NONE             /shared/projects   Defesa/6.SATCOM/Manufacturers
21768   1011    0x100081        Y     NONE             /shared/projects   Defesa/6.SATCOM/Manufacturers/SISLIVE
_________________________________________

vanderlei.massarioli @ echo :

22001   1007    0x100081        Y     NONE             /shared/financeiro   Fin-Tools
_________________________________________

zulu:~#

Last edited by centos123; 04-29-2012 at 11:01 PM.
 
Old 04-30-2012, 01:16 AM   #23
centos123
Member
 
Registered: Apr 2011
Posts: 397

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jsveiga View Post
What kind of output/monitoring do you need?

Something realtime (sort of like top does for processes), something that logs accesses to a logfile, something that sends notification emails when someone accesses specific files, etc, and which information (time + user@host + file)?

BR,

Joao S Veiga
actually i need something like monitoring all latest access of samba shares by user listed by ip address like smbstatus -s command show.and user name on the screen .second one is that when ever other user access other shared file a mail is to sent to notifying of accessing....is this is possible.i know that for sending mail i need to configure mailserver also in file server... without configuring is it possible?
 
Old 04-30-2012, 07:25 AM   #24
jsveiga
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: debian on servers and embedded, kubuntu elsewhere
Posts: 31

Rep: Reputation: 1
Quote:
Originally Posted by centos123 View Post
your program is in perl? ..
Yes, (the R in peRl is for "Report", after all ). I have posted the program earlier in this thread.

BR,

Joao S Veiga
 
Old 04-30-2012, 10:18 AM   #25
jsveiga
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: debian on servers and embedded, kubuntu elsewhere
Posts: 31

Rep: Reputation: 1
Quote:
Originally Posted by centos123 View Post
actually i need something like monitoring all latest access of samba shares by user listed by ip address like smbstatus -s command show.and user name on the screen .second one is that when ever other user access other shared file a mail is to sent to notifying of accessing....is this is possible.i know that for sending mail i need to configure mailserver also in file server... without configuring is it possible?
Ok, there are many ways of doing what you need.

With a fairly default samba configuration, you probably already have the latest access log per share/user in /var/log/samba/*. For example I have just accessed the \\zulu\public share from a client PC named whiskey, and on /var/log/samba/ I have:
Code:
zulu:/var/log/samba# tail -2 /var/log/samba/whiskey.log 
[2012/04/30 09:37:59.531540,  1] smbd/service.c:1070(make_connection_snum)
  whiskey (192.168.168.150) connect to service public initially as user jsveiga (uid=1000, gid=100) (pid 25912)
(check man smb.conf for "log file"; you can use a single logfile, or per user or per machine)
A script (or simply grep) can filter out the lines with extra information you do not need.
This however will not give you detailed information on what has been done nor which files in the share have been accessed. It is only at share level.
For more detail logging, you can use and tweak kyrunner's solution (see man smb.conf for the %x variables you can use). His example will log this information via syslog (so it will go to you /var/log/syslog and/or /var/log/messages, depending on your syslog.conf):
Code:
Apr 30 09:35:38 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:45 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:45 zulu smbd[25877]: jsveiga|192.168.168.150|mkdir|ok|New folder 
Apr 30 09:35:45 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:47 zulu last message repeated 2 times
Apr 30 09:35:47 zulu smbd[25877]: jsveiga|192.168.168.150|rename|ok|./New folder|./Test 
Apr 30 09:35:47 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:47 zulu last message repeated 2 times
Apr 30 09:35:48 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|Test 
Apr 30 09:35:52 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:52 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|w|Test/New Text Document.txt 
Apr 30 09:35:52 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|Test 
Apr 30 09:35:52 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|Test 
Apr 30 09:35:54 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:54 zulu smbd[25877]: jsveiga|192.168.168.150|rename|ok|Test/New Text Document.txt|Test/sss.txt 
Apr 30 09:35:54 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|Test 
Apr 30 09:35:54 zulu last message repeated 2 times
Apr 30 09:35:57 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:57 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|Test 
Apr 30 09:35:58 zulu smbd[25877]: jsveiga|192.168.168.150|open|ok|r|. 
Apr 30 09:35:58 zulu smbd[25877]: jsveiga|192.168.168.150|unlink|ok|Test/sss.txt
You can do some tweaking to send it to a specific log using syslog.conf and the full_audit:facility/priority options added to his example). Check this or tweaking details: http://moiristo.wordpress.com/2009/0...user-activity/

To generate emails when files are opened, you could create a script to run as a daemon, monitoring the log. The script could even organize the information in a database so you could later query to generate your reports.

This script is an example of how to do it (you can use kyrunner's configuration only with the "open" audit option, if all you need it access notifications. If you need more, the script below can be tweaked accordingly):
Code:
#!/usr/bin/perl
use warnings;
use strict;
my $bigbrother = "user\@domain";
my $logfile = "/var/log/messages";
my $sharepath = "/shared/public";

# if you find this ugly, there's a File::Tail module in cpan
open (LOG, "/usr/bin/tail -f $logfile |");

while (<LOG>)
{
   chomp;
   next unless (m/^(.+) zulu smbd\[[0-9]+\]: (.+)\|(.+)\|open\|ok\|r\|(.+) $/); #yep, there's an empty space at the end of the log line
   my $timestamp = $1;
   my $user = $2;
   my $ip = $3;
   my $file = $4;
   next unless (-f "$sharepath/$file");
   # there's also an Email::Simple::Creator perl module for this
   qx{mail -s "File accessed" $bigbrother <<END
   $timestamp $user @ $ip
   $sharepath/$file
   };
}
Do not forget to replace the "zulu" in the regexp with your samba server name (how it shows in the log).

This script can be called from init, but don't forget to restart it from logrotate if you rotate the destination log, or it will probably stop working after the log is rotated.

To send the email you don't necessarily need a full internet-enabled mail server configured and running in your samba server. If you configure "$bigbrother" to a local linux account, it'll probably work without any further email configuration, but you'd have to configure some server service (pop/imap/webmail) to be able to access the emails from a standard email client or browser - or, you can just use the 'user friendly' "mail" from a command line.

Instead, you can configure your server to send email through an external email server ("smarthost"). If you use a debian-based distro with exim4, you can configure this with "dpkg-reconfigure exim4-config" (here's an example on how to use gmail as the smarthost: http://islandlinux.org/howto/configu...il-smtp-server ).

BR,

Joao S Veiga
 
Old 05-01-2012, 02:16 AM   #26
centos123
Member
 
Registered: Apr 2011
Posts: 397

Original Poster
Rep: Reputation: 16
thanks @jsveiga for sharing your knowledge and helping me .....what ever report i want similarly you guys provided.i will try to make a shell programing to make ease report.....
 
Old 05-01-2012, 02:17 AM   #27
centos123
Member
 
Registered: Apr 2011
Posts: 397

Original Poster
Rep: Reputation: 16
are you saying to add this in smb.conf file....if yes tell me also what did these syntax do?


Quote:
Originally Posted by kyrunner View Post
Add this to the end of your samba share entry


vfs objects = full_audit
full_audit:failure = none
full_audit:success = mkdir rename unlink rmdir open pwrite
full_auditrefix = %u|%I|%m|%S
 
Old 05-01-2012, 03:27 AM   #28
mail2ganesh.cse
Member
 
Registered: Apr 2012
Posts: 65

Rep: Reputation: Disabled
[root@lan ~]#
yum -y install samba
[root@lan ~]#
mkdir /home/share

[root@lan ~]#
chmod 777 /home/share

[root@lan ~]#
vi /etc/samba/smb.conf
# line 58: add the lines

unix charset = UTF-8
dos charset = CP932
# line 75: change

workgroup =
WORKGROUP
# line 81: uncomment and add IP address you allow

hosts allow = 127.
10.0.0.
# line 102: change

security =
share
# add at the bottom

[Share]
# any name you like

path = /home/share
# shared directory

writable = yes
# OK to write

guest ok = yes
# guest OK

guest only = yes
# guest only

create mode = 0777
# fully accessed

directory mode = 0777
# fully accessed

share modes = yes
# warn if some people access to a file
[root@lan ~]#
/etc/rc.d/init.d/smb start

Starting SMB services:
[ OK ]

Starting NMB services:
[ OK ]

[root@lan ~]#
chkconfig smb on
 
Old 05-01-2012, 05:18 AM   #29
centos123
Member
 
Registered: Apr 2011
Posts: 397

Original Poster
Rep: Reputation: 16
i was checking log i didnot get some line ...what does log say...


tail -f /var/log/samba/smbd.log

[2012/05/01 15:32:34, 0] smbd/service.c:make_connection(1235)
172.16.13.15 (172.16.13.15) couldn't find service asinghal //what does this line means
[2012/05/01 15:32:34, 0] smbd/service.c:make_connection(1235)
172.16.13.15 (172.16.13.15) couldn't find service asinghal
[2012/05/01 15:32:34, 0] smbd/service.c:make_connection(1235)
172.16.13.15 (172.16.13.15) couldn't find service asinghal
[2012/05/01 15:32:38, 0] lib/util_sock.c:read_data(540)
read_data: read failure for 4 bytes to client 172.16.37.30. Error = Connection reset by peer // what does this line means


[2012/05/01 15:32:45, 1] smbd/service.c:make_connection_snum(1077)

vanj1-ele-133 (192.168.3.133) connect to service yshukla initially as user common (uid=507, gid=507) (pid 17691)

[2012/05/01 15:30:32, 0] smbd/service.c:make_connection(1235)
172.16.13.15 (172.16.13.15) couldn't find service asinghal
[2012/05/01 15:30:32, 0] smbd/service.c:make_connection(1235)
172.16.13.15 (172.16.13.15) couldn't find service asinghal
[2012/05/01 15:30:32, 0] smbd/service.c:make_connection(1235)
172.16.13.15 (172.16.13.15) couldn't find service asinghal
[2012/05/01 15:30:32, 0] smbd/service.c:make_connection(1235)
172.16.13.15 (172.16.13.15) couldn't find service asinghal

[2012/05/01 15:42:08, 1] smbd/service.c:close_cnum(1274)
172.16.37.30 (172.16.37.30) closed connection to service rrathi
[2012/05/01 15:42:17, 0] lib/util_sock.c:read_data(540)
read_data: read failure for 4 bytes to client 172.16.13.15. Error = Connection reset by peer



iam getting lots of this error log ...can you please clear this error..
 
Old 05-01-2012, 06:05 AM   #30
kyrunner
LQ Newbie
 
Registered: Apr 2012
Location: New York
Distribution: Centos,Debian
Posts: 29

Rep: Reputation: 1
Quote:
Originally Posted by centos123 View Post
are you saying to add this in smb.conf file....if yes tell me also what did these syntax do?
Here is my samba share



[test]
comment = test samba share
path = /srv/samba
browsable = yes
read only = no
force group = test
create mask = 0770
directory mask = 0770
vfs objects = full_audit
full_audit:failure = none
full_audit:success = mkdir rename unlink rmdir open pwrite
full_auditrefix = %u|%I|%m|%S

This will tell you every action taken on your samba share. who opens a folder.(mkdir)
rename unlink rmdir open pwrite. Then just go to syslog and you can see what was being done on your samba share.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing SAMBA shared folder through Ftp (PROFTPD) vvagao Debian 1 10-13-2009 12:49 PM
Windows machine can not see my samba shared folder. mtlhd Linux - Server 13 05-09-2009 09:01 PM
Accessing Linux shared folder from Windows XP bekiricli Linux - Newbie 8 02-10-2009 03:50 PM
how do i connect to a windows shared folder using samba? winstone5000 Linux - Networking 1 12-19-2005 10:38 AM
Samba not accessing my Windows Shared folders Felpipe Linux - Networking 3 08-04-2005 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration