SUMMARY: Concurrent Session restriction

From: Teresa & Darryl Pace (
Date: Fri Jul 30 1999 - 15:42:33 CDT

    Thank you greatly for your help. Those that replied were:
Jeffrey Pyne
Steve Gauthier
Douglas S. Hagan
Kevin Sheehan
Matthew Stier
Bryan Blackburn

My original question followed by the answers I
received follow.
    Is there a way to limit the number of concurrent sessions
a user is able to create? For example, if I wanted to limit a
user to at most 1 session when logged into a Solaris 2.6
server, while allowing other users the usual virtually unlimited
number of connections that are possible, would there be a
way to enforce this?
We had to do this at a company I used to work for once. A new
was rolled out which turned out to be unstable, so each user was limited
a maximum of one connection. This was done in somewhat of a kludgey
All of the users we wanted to exempt happened to be in the same group
(sysadm). All we did was put a statement in /etc/profile to the effect

        if [ `who | grep $user | wc -l` -gt 1 -a "$group" != "sysadm" ]
                banner "MAX SESSIONS REACHED"

(and the values of $user and $group had been set previously in this
particular /etc/profile). This isn't the exact code, but that's the
gyst of
it. There may be a more elegant way to do it, but this worked for us.

> Jeffrey Pyne
I believe so - used to be called ASET I think, but Sun has a product
that allows you to limit time of login, number of sessions, &c.

                l & h,
There is a freeware application you can get called "idled". Not only
can it monitor for user idleness, it can enforce the session limits you
are trying to implement.

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:24 CDT