Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting number of interactive sessions for a specific user.

 
SOLVED
Go to solution
Steve Calnek
Advisor

Limiting number of interactive sessions for a specific user.

Hi,

Hardware: I64
OS: OpenVMS 8.3

Is there a simple way to limit the number of interactive terminal sessions a specific user account can open?

Thanks/
7 REPLIES 7
Jess Goodman
Esteemed Contributor
Solution

Re: Limiting number of interactive sessions for a specific user.

You don't say if you have a cluster environment. But you can easily limit the number of processes a user can have on one node with the AUTHORIZE command:
MODIFY user /MAXJOBS=n
However that limit applies to all job modes, not interactive.

The other approach is to put code in the users' LOGIN.COM that uses lexicals F$CONTEXT and F$PID to count the interactive sessions on either that node, or the entire cluster, and log off the user if the limit has been reached. Note that the account must have the RESTRICTED or CAPTIVE flag set to prevent the user from having an easy way to get around this.
I have one, but it's personal.
The Brit
Honored Contributor

Re: Limiting number of interactive sessions for a specific user.

I dont think you can be this explicit, however checkout "authorize" utility, specifically the following quotas

Maxjobs
Maxacctjobs
Maxdetach

You could of course include some code in your sylogin script to control the number of interactive login's (on a node-by-node basis)

Dave.
RBrown_1
Trusted Contributor

Re: Limiting number of interactive sessions for a specific user.

Does this specific user use batch or any other kind of login? If not, then the MAXJOBS field in the UAF record will do what you want.

Otherwise I think the only choice you have is for code in SYLOGIN.COM to check for this user and interactive session.
Steve Calnek
Advisor

Re: Limiting number of interactive sessions for a specific user.

I found my anser second before you guys posted so I reopened to give you the points.

Thanks!
Jan van den Ende
Honored Contributor

Re: Limiting number of interactive sessions for a specific user.

Steve,

the MAX parameter in UAF looks nteresting, BUT:

that way you should realise that a user restricted to n sessions that currently DOES use his n session CAN NOT print! That would create another (print-)job, which would get his totals over the limit, which would not be allowed.

IMHO, the way to go is already suggested by Jess. Careful DCL will do exactly all your specific requirements, and can have a clusterwide working.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Cass Witkowski
Trusted Contributor

Re: Limiting number of interactive sessions for a specific user.

What is the answer please post
Craig A
Valued Contributor

Re: Limiting number of interactive sessions for a specific user.

Another way of restricting just interactive logins is to use something like th ecode below.

Craig



$ SET NOON
$ MODE = F$MODE()
$ LOGIN_FILE = "SYS$LOGIN:LOGIN.DAT"
$ IF MODE .EQS. "INTERACTIVE"
$ THEN
$ IF F$SEARCH("''LOGIN_FILE'") .EQS. "" - THEN $CREATE 'LOGIN_FILE'
$ OPEN/READ/WRITE/SHARE=READ - LOGIN_FIL 'LOGIN_FILE'/ERROR=ERROR
$ ENDIF
$ EXIT
$ ERROR:
$ WRITE SYS$OUTPUT "LOGIN conflict occured"
$ LOGOUT