[Samba] Samba PDC

Gémes Géza geza at kzsdabas.sulinet.hu
Thu Oct 23 22:56:55 GMT 2003

Hash: SHA1

Douglas Phillipson írta:
| Gémes Géza wrote:
|> Hash: SHA1
|> Sebastian Davancens írta:
|> | Hi all. how can i do to run a sript in a Samba PDC
|> | server (Redhat 9.0, Samba 3.0) each time that someboy
|> | connects to a share on the server from a client? The
|> | script is a shell script. IT IS NOT THE LOGON SCRIPT.
|> | I tried with some parameters like exec, preexec and
|> | root preexec, but i got nothing. this is the script:
|> |
|> | for i in `cat /etc/group |grep $1 | cut -d: -f1` ; do
|> |    touch /home/$1/._$i
|> | done
|> |
|> | please, somebody hel me with this..
|> | thanks in advance
|> | Sebastian
|> |
|> |
|> | ------------
|> | Internet GRATIS es Yahoo! Conexión
|> | 4004-1010 desde Buenos Aires. Usuario: yahoo; contraseña: yahoo
|> | Más ciudades: http://conexion.yahoo.com.ar
|> Specify in the share
|> preexec script = scriptname %U if you want to run the script as the
|> connecting user
|> or
|> root preexec script = scriptname %U if you want to run the script as
|> root (Think twice if you realy need this)
|> or replace preexec with postexec, if you want to run it after the user
|> disconects, in my opinion much less reliable.
| I've found that there is a "timeout" time after which a share
| disconnects and thus runs the postexec script.  The user didn't log off,
| the inactivity on the share caused it to disconnect.  If the user uses
| the share it reconnects but the postexec script runs everytime the share
| times out so it's kind of worthless to me.
| Doug P

This is a real problem, with both preexec, and postexec scripts, the
only workaround I can see is to make your script check if the time of
the touched files is newer than a specified amount, in which case do not
touch them again. Ugly I know, but for now I don't have better ideas.


Geza Gemes
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the samba mailing list