Operating System - HP-UX
1828655 Members
8118 Online
109983 Solutions
New Discussion

login message and blocking

 
Raghavan_2
Occasional Advisor

login message and blocking

I am fairly new to HP UX, pl excuse me if I am wrong.
I have to issues to attend on HP-UX 11i v2 on Itanium2 1.5Ghz server.
1) I want to display a message on screen when users login that the server is under maintenance
2) I want to stop the users from logging on to the server during the maintenance period.

Pl help me to resolve this.
Thanks in advance.
Regards,
Raghavan
4 REPLIES 4
Ivan Krastev
Honored Contributor

Re: login message and blocking

Add some lines in /etc/profile:


user=`whoami`
if [ $user != root ]
then
echo "maintenance - try after ..."
exit
fi


regards,
ivan
Joel Girot
Trusted Contributor

Re: login message and blocking

Create or modify the file "security" in /etc/default/ and Put in NOLOGIN=1
the file owner will be bin:bin with 444 permissions.
Also create a file /etc/nologin and Put the message in there so that users gets it.

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33 on how to reward any useful answers given to your questions

Regards
Joel
Raghavan_2
Occasional Advisor

Re: login message and blocking

Thank you very much the script for the /etc/profile worked the way I was looking for.
Thank you very much.
Raghavan_2
Occasional Advisor

Re: login message and blocking

The script for /etc/profile solved my problem.
Thank you.
Regards,
Raghavan.