Operating System - HP-UX
1833788 Members
2612 Online
110063 Solutions
New Discussion

Modify Time-Based Access Control HPUX11.11 trusted

 
SOLVED
Go to solution
John Rivas
Occasional Contributor

Modify Time-Based Access Control HPUX11.11 trusted

Is there a way to use the command usermod to set the authorized login times?

I am trying to change approximately 700 users and wish to use a shell script to effect the change.

I have found that sam changes the user by executing the following command.
/usr/lbin/modprpw -l -m timeod=Any0400-2359
However when I look and the man entry it reccomends "Usage other than via SAM, and/or modifications out of sync with /etc/passwd or NIS+ tables, may result in serious database corruption and the inability to access the system."

Can usermod be used or is modprpw safe to use?
Any suggestions?

Thanks in advance.

 

P.S. This thread has been moved from Training & Education to  HP-UX > security. -HP Forum Moderator

1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Modify Time-Based Access Control HPUX11.11 trusted

The utility works quite well. I doubt that you are running NIS+ but if so, it requires some extra steps to keep the NIS+ tables in sync. What the warning is really telling you is to be careful. For example, you could change the u_name or u_id values in the protected database so that they don't agree with those in /etc/passwd. To be safe, it's always a good idea to be logged in as root in at least two seesions and to have a backup of /etc/passwd, /etc/group and the entire /tcb tree so that you can get yourself out of trouble as fast as you got yourself in.
If it ain't broke, I can fix that.