Koozali.org: home of the SME Server

Limit Concurrent Logins

Offline Plipper

  • *
  • 8
  • +0/-0
Limit Concurrent Logins
« 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. 

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Limit Concurrent Logins
« Reply #1 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

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Limit Concurrent Logins
« Reply #2 on: April 27, 2016, 05:57:08 PM »

Offline Plipper

  • *
  • 8
  • +0/-0
Re: Limit Concurrent Logins
« Reply #3 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
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Limit Concurrent Logins
« Reply #4 on: April 27, 2016, 06:02:45 PM »
Let US know

Offline Plipper

  • *
  • 8
  • +0/-0
Re: Limit Concurrent Logins
« Reply #5 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.

Offline Plipper

  • *
  • 8
  • +0/-0
Re: Limit Concurrent Logins
« Reply #6 on: April 27, 2016, 06:04:16 PM »