[Samba] deny second or multiple logins

Marcus Sobchak <lists at localguru.de> lists at localguru.de
Mon Apr 2 10:14:54 GMT 2007


Hei,

Am Sonntag, den 01.04.2007, 20:28 +0200 schrieb Thomas Bork:
> Freitas wrote:
> 
> >     You can try here.
> > http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/AdvancedNetworkManagement.html#id386516 
> 
> Sorry for being so stupid but how should this working?

I think the scipt is just an idea how to handle this problem. Here is my
script:

preexec script = /path/PermitSingleLogon.sh '%U'
preexec close = Yes

----------
#!/bin/bash

RESULT=$(smbstatus -d0 -b -u $1 2> /dev/null | grep $1)

if [ "X${RESULT}" == X  ]; then
   exit 0
else
   exit 1
fi
----------

But I still don't know how to combine this script with my existing logon
script.

Ciao,
Marcus




More information about the samba mailing list