1849291 Members
6556 Online
104042 Solutions
New Discussion

/etc/nologin

 
SOLVED
Go to solution
Alzhy
Honored Contributor

/etc/nologin

In Solaris, the presence of said file restricts logins displaying the contents of said file..... What's the equivalent on HP-UX?
Hakuna Matata.
6 REPLIES 6
Ken Penland_1
Trusted Contributor

Re: /etc/nologin

we have /etc/NOLOGINS but to be honest with you, I dont think it is a default HPUX thing....I think most admins just add that functionality to the /etc/profile to check for it and kick people off if it sees the file.
'
Jeff Schussele
Honored Contributor
Solution

Re: /etc/nologin

Hi Nelson,

Same thing --> /etc/nologin
But check the /etc/default/security file & insure that NOLOGIN=1 if it's set to 0 then the /etc/nologin will be ignored.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
John Poff
Honored Contributor

Re: /etc/nologin

Hi,

Yes, but in the /etc/default/security file
you'll need an entry of NOLOGIN=1 to use it.
The value of NOLOGIN=0 ignores the /etc/nologin file and is the default. I think this behavior
just works in HP-UX 11i.

JP
James R. Ferguson
Acclaimed Contributor

Re: /etc/nologin

Hi Nelson:

You set NOLOGIN=1 in '/etc/default/security'. This enables the use of 'etc/nologin'. That is, its contents are displayed and the login exits if the file '/etc/nologin' exists.

Regards!

...JRF...

Alzhy
Honored Contributor

Re: /etc/nologin

I did a search and found the answer...! Thanks for the quick replies though.

Hakuna Matata.
Jeff Schussele
Honored Contributor

Re: /etc/nologin

OH & I should have added that the *contents* of /etc/nolgin will be displayed & the login exited.
So if you want a msg to be displayed like
"Logins not allowed at this time" or such create /etc/nologin with that text. Else if you just touch the file then no logins will be allowed & no msg will be displayed. But again, /etc/default/security MUST have NOLOGIN=1 or the /etc/nologin file will be ignored.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!