Operating System - HP-UX
1847337 Members
1995 Online
110264 Solutions
New Discussion

Re: Can't read /etc/nologin message

 
Ed Hon
Regular Advisor

Can't read /etc/nologin message

The /etc/nologin message flashes by too quickly for any human to read it. How can I pause it for a few seconds.
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Can't read /etc/nologin message

Just put a sleep command after you cat /etc/nologin. I do a 'sleep 5' in my scripts.
S.K. Chan
Honored Contributor

Re: Can't read /etc/nologin message

You should be able to insert a sleep command before the nologin is display.
eg: sleep 5
==> 5 second sleep
Ed Hon
Regular Advisor

Re: Can't read /etc/nologin message

My understanding is that the contents of the /etc/nologin file are merely displayed on the screen during the login process. How can do I put a sleep command in this file, when it is only displayed?
Darrell Allen
Honored Contributor

Re: Can't read /etc/nologin message

Hi Ed,

You are apparantly setting NOLOGIN=1 in /etc/default/security. I believe you are right in that the contents of that file are displayed after the system generated message:

Only superusers are allowed to login at this time due to the presence
of the file /etc/nologin and NOLOGIN option set in /etc/default/security

Using that method, if the screen is "cleared" automatically to post the login prompt, then you are probably out of luck. I have no such problem using telnet and rlogin but I don't have a direct connect terminal to try it on.

In the past, before HP added nologin support in /etc/security/default, some have coded their own /etc/nologin logic in /etc/profile and /etc/csh.login. You could verify the user isn't root (or whomever you want) and exit after displaying a message and sleeping. I don't know if CDE is affected by that or not.

Just an idea.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)