Operating System - HP-UX
1834961 Members
1678 Online
110071 Solutions
New Discussion

specify authorized login times

 
ian_60
Advisor

specify authorized login times

I want to specify authorized login times for my users, is there a quick way to do this or do I have to do this individually thought SAM?
My system is trusted.

Thanks in advance,
Ian
you only live once
3 REPLIES 3
Michael Tully
Honored Contributor

Re: specify authorized login times

SAM is the best way to do this. You can set times individually. I am not sure if you can at group level or globally. But setting these globally would stop important people logging in like you .... (I'm not near a system so I can't tell for for sure.)
Anyone for a Mutiny ?
Darren Prior
Honored Contributor

Re: specify authorized login times

Hi Ian,

Michael's right about using SAM, additionally you cannot change login times for all users or by group. The data for the login times is stored in the tcb file for each user - if it were in the default file for all users you'd have a problem with root logging in outside those times!

You could consider using getprpw and modprpw to display and edit these values, ensuring that you use the correct format for them. These commands have man pages only at 11i, and I believe are still considered to be tools for SAM rather than general usage.

root@hpwin109 #/usr/lbin/getprpw -m timeod testuser
timeod=Wk0900-1700

root@hpwin109 #/usr/lbin/getprpw -m timeod testuser2
timeod=-1

regards,

Darren
Calm down. It's only ones and zeros...
Bill Hassell
Honored Contributor

Re: specify authorized login times

Note that login time restrictions are only available in a Trusted system. For standard HP-UX system, you would have to use /etc/profile to control access.


Bill Hassell, sysadmin