Re: [Samba] Samba logging behavior on new files

2007-05-03 Thread Bala

Hi,

Firstly I would like to say about the problem.

Whenever new file is created by samba clients in samba directory
shares, they should be moved to another directory.

The solution is very straight forward.  My VFS module keeps list of
fds when a file is opened with write/read-write flag in open() vfs 
function.  On close() vfs function, if passed fd is in list of fds 
made in open() function, is moved to well known directory.

I started modifying skel_transparent.c file and kept only connect(),
disconnect(), open() and close() functions.

I hope this gives some clarity.

Thanks,

Regards,
Bala

--- Henrik Zagerholm <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> It would be interesting see how you did it so if its not to much  
> trouble share it here or on the samba wiki.
> 
> cheers
> 
> 2 maj 2007 kl. 04:22 skrev Bala:
> 
> >
> > Hi,
> >
> > I trashed my stupid idea/program and wrote samba VFS module to do
> > the same thing.  It works very well.
> >
> >> I have home made program, which uses File Alteration Monitor library
> >> to watch samba log files for new file creation in samba share
> >> directory.
> >>
> >> This technique works fine when I use GNU/Linux machine as client and
> >> it fails when I use Windows machine as client.  The cause of failure
> >> is, samba server creates different pattern of logs and sometimes it
> >> does not create log entries on new file creation.
> >>
> >> New file creation is done by copying file to share directory after
> >> mounting it.
> >>
> >> Log configuration of samba server is
> >> log file = /var/log/samba/%U.log
> >> log level = 2
> >>
> >> Below is log entries when GNU/Linux is used.
> >>
> >> [2007/03/20 18:01:18, 2] smbd/open.c:open_file(245)
> >>   b2bc1ir opened file outbox/echoserver read=Yes write=Yes  
> >> (numopen=1)
> >> [2007/03/20 18:01:18, 2] smbd/reply.c:reply_mknew(1324)
> >>   new file outbox/echoserver
> >> [2007/03/20 18:01:18, 2] smbd/close.c:close_normal_file(270)
> >>   b2bc1ir closed file outbox/echoserver (numopen=0)
> >>
> >> Below is log entries when Windows is used.
> >>
> >> [2007/03/25 21:48:53, 2] smbd/open.c:open_file(245)
> >>   b2bc1ir opened file outbox/test.txt read=No write=Yes (numopen=2)
> >> [2007/03/25 21:48:53, 2] smbd/close.c:close_normal_file(270)
> >>   b2bc1ir closed file outbox/test.txt (numopen=1)
> >> [2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
> >>   b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
> >> [2007/03/25 21:48:54, 2] smbd/close.c:close_normal_file(270)
> >>   b2bc1ir closed file outbox/test.txt (numopen=1)
> >> [2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
> >>   b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
> >> [2007/03/25 22:00:07, 2] smbd/open.c:open_file(245)
> >>
> >>
> >> I use CentOS v4.4 and Samba version 3.0.10-1.4E.9
> >>
> >> What could be wrong in my setup?
> >>
> >
> >
> > Thanks,
> >
> > Bala
> >
> >
> > __
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> > -- 
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  https://lists.samba.org/mailman/listinfo/samba
> 
> 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba logging behavior on new files

2007-05-02 Thread Henrik Zagerholm

Hi,

It would be interesting see how you did it so if its not to much  
trouble share it here or on the samba wiki.


cheers

2 maj 2007 kl. 04:22 skrev Bala:



Hi,

I trashed my stupid idea/program and wrote samba VFS module to do
the same thing.  It works very well.


I have home made program, which uses File Alteration Monitor library
to watch samba log files for new file creation in samba share
directory.

This technique works fine when I use GNU/Linux machine as client and
it fails when I use Windows machine as client.  The cause of failure
is, samba server creates different pattern of logs and sometimes it
does not create log entries on new file creation.

New file creation is done by copying file to share directory after
mounting it.

Log configuration of samba server is
log file = /var/log/samba/%U.log
log level = 2

Below is log entries when GNU/Linux is used.

[2007/03/20 18:01:18, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/echoserver read=Yes write=Yes  
(numopen=1)

[2007/03/20 18:01:18, 2] smbd/reply.c:reply_mknew(1324)
  new file outbox/echoserver
[2007/03/20 18:01:18, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/echoserver (numopen=0)

Below is log entries when Windows is used.

[2007/03/25 21:48:53, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=No write=Yes (numopen=2)
[2007/03/25 21:48:53, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/test.txt (numopen=1)
[2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
[2007/03/25 21:48:54, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/test.txt (numopen=1)
[2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
[2007/03/25 22:00:07, 2] smbd/open.c:open_file(245)


I use CentOS v4.4 and Samba version 3.0.10-1.4E.9

What could be wrong in my setup?




Thanks,

Bala


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Samba logging behavior on new files

2007-05-01 Thread Bala

Hi, 

I trashed my stupid idea/program and wrote samba VFS module to do
the same thing.  It works very well.

> I have home made program, which uses File Alteration Monitor library
> to watch samba log files for new file creation in samba share
> directory.
> 
> This technique works fine when I use GNU/Linux machine as client and
> it fails when I use Windows machine as client.  The cause of failure
> is, samba server creates different pattern of logs and sometimes it
> does not create log entries on new file creation.
> 
> New file creation is done by copying file to share directory after
> mounting it.
> 
> Log configuration of samba server is
> log file = /var/log/samba/%U.log
> log level = 2
> 
> Below is log entries when GNU/Linux is used.
> 
> [2007/03/20 18:01:18, 2] smbd/open.c:open_file(245)
>   b2bc1ir opened file outbox/echoserver read=Yes write=Yes (numopen=1)
> [2007/03/20 18:01:18, 2] smbd/reply.c:reply_mknew(1324)
>   new file outbox/echoserver
> [2007/03/20 18:01:18, 2] smbd/close.c:close_normal_file(270)
>   b2bc1ir closed file outbox/echoserver (numopen=0)
> 
> Below is log entries when Windows is used.
> 
> [2007/03/25 21:48:53, 2] smbd/open.c:open_file(245)
>   b2bc1ir opened file outbox/test.txt read=No write=Yes (numopen=2)
> [2007/03/25 21:48:53, 2] smbd/close.c:close_normal_file(270)
>   b2bc1ir closed file outbox/test.txt (numopen=1)
> [2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
>   b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
> [2007/03/25 21:48:54, 2] smbd/close.c:close_normal_file(270)
>   b2bc1ir closed file outbox/test.txt (numopen=1)
> [2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
>   b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
> [2007/03/25 22:00:07, 2] smbd/open.c:open_file(245)
> 
> 
> I use CentOS v4.4 and Samba version 3.0.10-1.4E.9
> 
> What could be wrong in my setup?
> 


Thanks,

Bala


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba logging behavior on new files

2007-03-29 Thread Bala
Hi list,

I have home made program, which uses File Alteration Monitor library
to watch samba log files for new file creation in samba share
directory.

This technique works fine when I use GNU/Linux machine as client and
it fails when I use Windows machine as client.  The cause of failure
is, samba server creates different pattern of logs and sometimes it
does not create log entries on new file creation.

New file creation is done by copying file to share directory after
mounting it.

Log configuration of samba server is
log file = /var/log/samba/%U.log
log level = 2

Below is log entries when GNU/Linux is used.

[2007/03/20 18:01:18, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/echoserver read=Yes write=Yes (numopen=1)
[2007/03/20 18:01:18, 2] smbd/reply.c:reply_mknew(1324)
  new file outbox/echoserver
[2007/03/20 18:01:18, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/echoserver (numopen=0)

Below is log entries when Windows is used.

[2007/03/25 21:48:53, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=No write=Yes (numopen=2)
[2007/03/25 21:48:53, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/test.txt (numopen=1)
[2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
[2007/03/25 21:48:54, 2] smbd/close.c:close_normal_file(270)
  b2bc1ir closed file outbox/test.txt (numopen=1)
[2007/03/25 21:48:54, 2] smbd/open.c:open_file(245)
  b2bc1ir opened file outbox/test.txt read=Yes write=No (numopen=2)
[2007/03/25 22:00:07, 2] smbd/open.c:open_file(245)


I use CentOS v4.4 and Samba version 3.0.10-1.4E.9

What could be wrong in my setup?

Please advice,

Thanks in advance,

Bala



 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] samba Logging

2006-09-11 Thread Pavan
Hi All,
 
   Can anyone help me, on how to log the user activity on samba like
what files they have accessed? what files they have created? What files
they have deleted? Etc etc..

At the moment samba is only logging the user login data. And there's no
way for me to monitor the activity of the users, other than "smbstatus"
but still this one will not show the activities which are already
performed.

Thanks heaps

Pavan.


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


[Samba] Samba Logging for Audit Trails

2004-07-08 Thread Honey Bajaj

  Hi,

  I am using Samba 3.0.4 as PDC and have 3 domain member server, I would like to setup 
a logging of the files which gets deleted by the user. I have already used Audit 
Modules but that slows down the samba server very much, please suggest me possible 
ways of achieving the desired result.

  Thanks,
  Honey
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] Samba logging file modifications

2003-03-13 Thread Thiago Lima
 
Hi,
 
I'm using samba as a file server for my network. Samba 2.2.6 is
running on a linux/2.4.18 and all my clients access the share as guest. 
 
I want to log every file modification/upload/delete and the machine
that did it, there's any way to do that?
 
Thanks alot
Thiago
 
 
 
 
 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba