[K12OSN] Multiple logins UPDATE
goblin at scooter.co.nz
goblin at scooter.co.nz
Wed Sep 29 23:34:44 UTC 2004
norbert wrote:
> Hi Les,
>
> Well I've tried that script over and over but I get the same result !
> Once it runs and I restart dhcpd & xinetd none of the terminals can
> login. The part for the groups seems to be good but it's of little use
> if no one can login.... BTW I'm running this on a test machine ...
>
Probably getting headers from ps (use the "h" option)
anyways try this see if it works
==========================8<==============================
#!/bin/sh
TTY="$(tty)"
my_tty="${TTY##/dev/}"
if [ -n "$(ps -u $LOGNAME h | grep -v $my_tty)" ]; then
cat << EOF
You already have an active session on this system and you are
allowed a single session. This session will now be closed
EOF
sleep 2
exit
fi
===============================>8============================
mRgOBLIN
More information about the K12OSN
mailing list