Operating System - HP-UX
1834126 Members
2399 Online
110064 Solutions
New Discussion

How to control the number of log sessions fro a user

 
SOLVED
Go to solution
Simon Qu
Frequent Advisor

How to control the number of log sessions fro a user

On hp-ux 11i, if a user is already logged on, how can I prevent the user from logging again?
In other word, is there a way to set the maximum logs for a user?
Thanks advance.
3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: How to control the number of log sessions fro a user

Create the file /etc/default/security and in that file add a line like:

NUMBER_OF_LOGINS_ALLOWED=?

Where ? is the number of logins you want each user to have. If you just want 1 then:

NUMBER_OF_LOGINS_ALLOWED=1

Do a 'man security' for more details.
Simon Qu
Frequent Advisor

Re: How to control the number of log sessions fro a user

Thank you.
One more question:
Can I set different numbers for different users? For example, Some users need 2 logs, some users need 1 log.
Patrick Wallek
Honored Contributor

Re: How to control the number of log sessions fro a user

No, not with the /etc/default/security file.

If you need different numbers for different users you would have to check with /etc/profile or the users ~/.profile.