[Samba] deny second or multiple logins
Marcus Sobchak <lists at localguru.de>
lists at localguru.de
Tue Apr 3 19:34:16 GMT 2007
Hi,
Am Montag, den 02.04.2007, 14:33 +0200 schrieb Helmut Hullen:
> Hallo, Marcus,
>
> Du (lists) meintest am 02.04.07:
>
> >>> http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/Advanced
> >>> NetworkManagement.html#id386516
>
> > my script:
>
> > preexec script = /path/PermitSingleLogon.sh '%U'
> > preexec close = Yes
[...]
The block mechnism itself ist working fine. I use this scipt to check if
there are connects to a share with the same userid form differnet IPs:
-------
RESULT=$(smbstatus -d0 -b -u $1 2> /dev/null | grep $1 | awk '{print
$5}' | uniq | wc -l)
test "$RESULT" -eq 1 || exit 1
-------
But it seems, that windows reconnects the shares every few minutes. In
this case, the script doesn't know anymore which client PC was first and
is blocking both client PCs, the client first and all other clients :-(
Ciao,
Marcus
More information about the samba
mailing list