LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-03-2003, 01:14 PM   #1
vmicho
Member
 
Registered: Jun 2003
Location: Slovakia
Distribution: Debian unstable i586
Posts: 38

Rep: Reputation: 15
Question Has Samba some event handling possibility?


Hi everyone.

I'm running samba 3, sharing some of my directories on a local network.


I wanted to do the following:

I have some shares accessible.
Every time somebody access a specific folder or share, I want to run a script.
Like an event handler.
Ex: user DD access share Music
(a connection is established, and I can see it with "smbstatus -v", and log.smbd is updated)
I want: samba then executes script "somescript.sh"

I read the samba howto, but I didn't see anything like that.



Doing smbstatus in a cycle is definitely bad idea (it is cpu hungry, and in a slow cycle it can miss)

Maybe a good idea is syncing with "tail -f /var/log/samba/log.smbd", but it only puts strings on the screen. Dunno how to execute program when new log is appended.

Can somebody help me with this please ?



 
Old 11-03-2003, 01:44 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Take a look at the following options for share definitions:
preexec
postexec
root preexec
root postexec

You cna read more in:
man smb.conf
 
  


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
HELP w/: Script for EVENT Handling!!! vitoal18t Programming 2 06-24-2009 02:36 PM
pygtk event handling pita Programming 1 10-20-2005 01:48 PM
VERY strange C# event handling problem, please read. jwn7 Programming 2 10-20-2005 10:28 AM
Is this a possibility? SevenForever Linux - Newbie 4 04-26-2005 10:27 PM
Need help handling a dial-in event GD_19 Linux - Networking 0 01-30-2004 12:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:16 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