1823416 Members
2711 Online
109655 Solutions
New Discussion юеВ

/etc/nologin

 
SOLVED
Go to solution
manu_5
Frequent Advisor

/etc/nologin

Hi,
How can i restrict normal user login i HP UX.Like /etc/nologin in Solaris.
11 REPLIES 11
U.SivaKumar_2
Honored Contributor

Re: /etc/nologin

Hi,

Try the same in HP-UX . It will work atleast with some patch :-)
regards,

U.SivaKumar
Innovations are made when conventions are broken
Clemens van Everdingen
Honored Contributor

Re: /etc/nologin

Hi,

For 11.00 you need at least patch PHCO_16309
This one is already superseded by PHCO_27721 which is the latest one.

In 10.20 it should work.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
manu_5
Frequent Advisor

Re: /etc/nologin

Hi I believe
if test -f /nologin
then
if [ $LOGNAME != "root" ]
then
echo "login not allowed"
sleep 5
exit
fi

will restict the user logins if i put the same in /etc/profile ,it restricts the users using telnet to login,but where do i put the same to restrict the uers logins using reflectionx.
Tom Geudens
Honored Contributor

Re: /etc/nologin

Hi,
If I read PHCO_25590 correctly, you have to implement this (after implementing the patch) in /etc/default/security.

An alternative might be to use /usr/bin/false as shell for those accounts you need ... but do not want to login.

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
manu_5
Frequent Advisor

Re: /etc/nologin

Hi,
Whats the patch for 11i.
Tom Geudens
Honored Contributor

Re: /etc/nologin

PHCO_25526 is the 11.11 patch.

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
T G Manikandan
Honored Contributor
Solution

Re: /etc/nologin

For hpux11.0 you require a patch.

For 11i you have the feature

check this doc

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062907697


Thanks
manu_5
Frequent Advisor

Re: /etc/nologin

Hi this patch : PHCO_25526 ..does not invoke /etc/nologin capability.
manu_5
Frequent Advisor

Re: /etc/nologin

Hi , i want to dispaly that message of /etc/nologin for some time on screen .I want to include sleep of 5 sec ..how can i do that.the message just goes away.
Chuck J
Valued Contributor

Re: /etc/nologin

Put something like this in /etc/profile

if [ $? -ne 0 -a "$LOGNAME" != "root" ]
then
clear
echo;echo;echo;
echo " Server is temporarily unavailable "
sleep 5
exit
fi


Chuck J
jerry1
Super Advisor

Re: /etc/nologin

Edit /etc/default/security and put the
line NOLOGIN=1 in it. Then /etc/nologin
will be used with whatever message you
choose put in it.

The file security does may not exist by
default.