[Samba] deny second or multiple logins

Marcus Sobchak <lists at localguru.de> lists at localguru.de
Wed Apr 4 06:24:02 GMT 2007


Am Dienstag, den 03.04.2007, 21:47 +0200 schrieb Helmut Hullen:
> Hallo, Marcus,
> 
> Du meintest am 03.04.07 zum Thema Re: [Samba] deny second or multiple logins:
> 
> > RESULT=$(smbstatus -d0 -b -u $1 2> /dev/null | grep $1 | awk '{print
> > $5}' | uniq | wc -l)
> 
> > test "$RESULT" -eq 1 || exit 1
> > -------
> 
> That's no good idea.
> Try
> 
>         test "$RESULT" -eq 0
> 
> Then the return level is 0 (= ok) for 0 , and it's 1 (not ok) for 1 or  
> higher.

Hmmm, if the value of RESULUT is not 1 or higher, the scipt has to "exit
1" (not ok), which is correct, because in this case the same userid
tries to connect from different IPs.

Ciao!




More information about the samba mailing list