Operating System - HP-UX
1820480 Members
2338 Online
109624 Solutions
New Discussion юеВ

what is the need of /etc/nologin

 
sukumar maddela
Occasional Advisor

what is the need of /etc/nologin

Hi,

1) what is the need of /etc/nologin file
2) what is the use of Use UsePrivilegeSeparation parameter in ssh config file.

thanks and regards
sukumar
4 REPLIES 4
Jean-Yves Picard
Trusted Contributor

Re: what is the need of /etc/nologin

hello,

nologin)

no mention of nologin is provided on man page, yet a long time ago nologin was created during shutdown process to prevent user from login while shutdown was in progress.

UsePrivilegeSeparation)

sshd run as root, seting UsePrivilegeSeparation to yes will fork a new shell upon connection with user (e.g. non root) id.
(ssh session is forked with your ID, not root's)

Jean-Yves
Orhan Biyiklioglu
Respected Contributor

Re: what is the need of /etc/nologin

1) if NOLOGIN parameter is enabled in /etc/default/security file

applications that use session management services provided by pam_hpsec such as ssh will check whether the file /etc/nologin exists at login time and disallow the login if it exists.

2) UsePrivilegeSeparation means sshd will run in normal user mode instead of root. You have to set up a normal user such as sshd for this purpose.

hth
A. Kay
Occasional Advisor

Re: what is the need of /etc/nologin

/etc/nologin prevents all users from login onto your system except root. It is helpful during maintenance when you don't want anyone to be on the system.
You can edit the file and put a message in which will be displayed for users anytime they try to access the system. The system checks and removes this file during your reboot process therefore it has to be created after each reboot (in case you have multiple reboots during your maintenance.)
Senthil Prabu.S_1
Trusted Contributor

Re: what is the need of /etc/nologin

Hi,

[1]. If the /etc/nologin file exists, the system prevents the user from logging in and displays the contents of the /etc/nologin file. The system does allow the root user to log in if this file exists. The /etc/nologin file is removed when you reboot the system.

[2].
One man's "magic" is another man's engineering. "Supernatural" is a null word.