[Samba] deny second or multiple logins
Hullen at t-online.de
Wed Apr 4 06:55:00 GMT 2007
Du meintest am 04.04.07 zum Thema Re: [Samba] deny second or multiple logins:
>>> test "$RESULT" -eq 1 || exit 1
>> That's no good idea.
>> 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,
That's the DOS way ...
> the scipt has to "exit 1" (not ok), which is correct, because in this
> case the same userid tries to connect from different IPs.
Your script returns with 1 also if $RESULT is 0.
My version returns with 0 if $RESULT is 0, otherwise with 1 (if it's the
last line in the script).
More information about the samba