hello, in first sorry for my poor english

i use this script to test if a user is already connected.

#!/bin/bash
resultat=$(/usr/local/samba/bin/net status sessions |grep $1 | awk '{print$2}')
if [ "X${resultat}" == X  ]; then
    exit 0
else
    exit 1
fi

in the smb.conf i add these lines :
[home]
root preexec = /usr/local/samba/bin/check-session %u
root preexec close = yes


when i test this script alone without samba it works fine. /usr/local/samba/bin/net status sessions |grep utilisateur | awk '{print$2}' give 0 if the user is not connected, and 1 if the user is connected


when i use it with samba (with the root preexec option) the user cant connect to the server even he's not already connected

in the log file i've got this
[2005/01/04 11:13:27, 1] smbd/service.c:make_connection_snum(616)
root preexec gave 1 - failing connection


if someone could help me

thank you

--
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
1 place Pierre Mendès France - 28000 Chartres
Tel: 02 37 91 83 36 - Fax: 02 37 91 83 01
[EMAIL PROTECTED]
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Reply via email to