Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: Plipper on April 27, 2016, 04:05:48 PM

Title: Limit Concurrent Logins
Post by: Plipper on April 27, 2016, 04:05:48 PM
Is there a way in a SME Domain to limit concurrent logins on the Windows member machines?  It doesn't have to be a SME feature, if there is a way to do it with logon scripts that is fine as well. 
Title: Re: Limit Concurrent Logins
Post by: Stefano on April 27, 2016, 05:52:15 PM
AFAIK there is no way in Windows native functionality to limit concurrent logins - i.e. to limit a given user account from logging on at one computer or device at a time.

there are some SW (on windows side) but they need an AD DC.. SME is "only" a NT style DC

so, the answer is no
Title: Re: Limit Concurrent Logins
Post by: Stefano on April 27, 2016, 05:57:08 PM
https://support.microsoft.com/en-us/kb/237282
Title: Re: Limit Concurrent Logins
Post by: Plipper on April 27, 2016, 06:01:28 PM
I am going to try this, I found it here: http://www.linuxquestions.org/questions/linux-networking-3/prevent-a-single-user-from-multiple-simultaneous-logins-452544/

created/copy a script "PermitSingleLogon.sh" with permissions 755 and placed it in the /etc/samba directory. Here is the script

#!/bin/bash

IFS="-"
RESULT=$(smbstatus -S -u $1 2> /dev/null | awk 'NF > 6 {print $1}' | sort | uniq -d)

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

Then I added the two lines to my netlogon share in the smb.conf file

[netlogon]
...
preexec script = /etc/samba/PermitSingleLogon.sh
preexec close = Yes
...
Title: Re: Limit Concurrent Logins
Post by: Stefano on April 27, 2016, 06:02:45 PM
Let US know
Title: Re: Limit Concurrent Logins
Post by: Plipper on April 27, 2016, 06:03:15 PM
https://support.microsoft.com/en-us/kb/237282

Yeah, I saw that already.  Several third parties can do it but require a Microsoft AD.  The state is requiring this for schools, even though Microsoft doesn't really support it.  Novell eDirectory does but want to stay away from that.
Title: Re: Limit Concurrent Logins
Post by: Plipper on April 27, 2016, 06:04:16 PM
Let US know

Yes, I will.