1829035 Members
2492 Online
109986 Solutions
New Discussion

disable login at HPUX

 
SOLVED
Go to solution
Hans Tonneijk
New Member

disable login at HPUX

Hoe can i restrict the login Time for a user? Is this possible under hpux 10.20?
Under NT and Novell is this no problem, but UNIX is the better Besy!!!

Thanks for help
Ronny
4 REPLIES 4
Andreas Voss
Honored Contributor

Re: disable login at HPUX

Hi,

don't know exactly what you mean but this is a method to autom. logout a user who has done nothing for a specific time:
Set in $HOME/.profile the variable TMOUT.
E. g.:
TMOUT=600 ; export TMOUT
will logout the user if he does nothing (input) for 10 minutes.

Regards

Andrew
Andreas Voss
Honored Contributor
Solution

Re: disable login at HPUX

Hi,

eventually you mean that you want to disable login at a specific time period:
I would do:
In $HOME/.profile:
hour=$(date '+%H')
if [ $hour -lt 8 -o $hour -ge 18 ]
then
echo "No login at this moment!"
exit 0
fi

This will disable login from 8 am to 6 pm.
Andreas Voss
Honored Contributor

Re: disable login at HPUX

Sorry,
my previous reply means that user cannot login from 6 pm to 8 am.
Andy Monks
Honored Contributor

Re: disable login at HPUX

You can also do it much easier via 'sam'. You'll have to convert to a trusted system first, but then you can limit users by time of day, day of week etc