Discussion Locked

Limit # of users to a group logging in

0 helpful
13 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I'm trying to find a way to limit the number of groups logins. Say I have a groups of users and I want to allow up to 10 people in group 1 to be logged on simultaneously but when the eleventh tries to login, I would like to spit out an "exceeded number of group" kinda message and abort their login.

Any examples will be fine... although I'm going to have to recreate this on an HP/UX system using ksh... but thats my problem

Thanks,

Glenn

13 replies

by cavedweller

What comes to mind is running a check in the global login script. Try doing a unique sort on `who`, then map the results to groups in /etc/group or your network maps and do a quick count. Have the script exit with an error message if the count is exceeded.

by zeus_ru

I dont know about HP/UX but in Linux we do it by editing the file /etc/security/limits.conf

There a line
@group1 - maxlogins 10
will restrict to 10 the number of logins for the group group1

by zeus_ru

I dont know about HP/UX but in Linux we do it by editing the file /etc/security/limits.conf

There a line
@group1 - maxlogins 10
will restrict to 10 the number of logins for the group group1

by zeus_ru

I dont know about HP/UX but in Linux we do it by editing the file /etc/security/limits.conf

There a line
@group1 - maxlogins 10
will restrict to 10 the number of logins for the group group1

by zeus_ru

I dont know about HP/UX but in Linux we do it by editing the file /etc/security/limits.conf

There a line
@group1 - maxlogins 10
will restrict to 10 the number of logins for the group group1

by zeus_ru

I dont know about HP/UX but in Linux we do it by editing the file /etc/security/limits.conf

There a line
@group1 - maxlogins 10
will restrict to 10 the number of logins for the group group1

This discussion is closed to new replies.