Operating System - HP-UX
1833006 Members
3148 Online
110048 Solutions
New Discussion

How to prevent users from logging onto the machine

 
Sabrina Lautier
Advisor

How to prevent users from logging onto the machine

In order to deny users access to the machine during maintenance operation, on Sun servers I create file /etc/nologin.
I did the same on our HP-UX 11.11 server but without any effects.

Do you know a way to do that on HP-UX ?

Regards,
Sabrina
6 REPLIES 6
Thierry Poels_1
Honored Contributor

Re: How to prevent users from logging onto the machine

hi,

either go to single user mode
or check for the existance of a file (e.g. /etc/nologin) in the login profiles (/etc/profile)

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Muthukumar_5
Honored Contributor

Re: How to prevent users from logging onto the machine

We can do the this limitation using inetd.sec file. Allow only your ip-address to be allowed to login.

I hope this will not give the effect on currently logged user(s). It is good to go to the single user mode to do the operations.

If you want to do with nologin you have to set NOLOGIN=1 in /etc/default/security file.

A more related solution is here at,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=147806

Easy to suggest when don't know about the problem!
Bill Hassell
Honored Contributor

Re: How to prevent users from logging onto the machine

The existence of /etc/nologin will prevent ordinary users from logging on but only if the /etc/default/security file has the entry:

NOLOGIN=1

NOTE: this file does not exist by default. The man page for security defines the fields. Earlier versions such as 11.00 may have these options available as long as the security patches are current. Note also that many of the options in /etc/default/security do not have any effect if the system is not Trusted. There is currently no validity checker for this file so spelling errors or options that don't work won't be logged--you just have to try each option.


Bill Hassell, sysadmin
Sabrina Lautier
Advisor

Re: How to prevent users from logging onto the machine

Thanks a lot for your help.
Creating /etc/nologin file and setting variable NOLOGIN to 1 in file /etc/default/security works fine.
Muthukumar_5
Honored Contributor

Re: How to prevent users from logging onto the machine

Hope you got a way to block users. It is good to give points to boost responder(s) :)
Easy to suggest when don't know about the problem!
Bharat Katkar
Honored Contributor

Re: How to prevent users from logging onto the machine

Assign points if it works... you should be happy doing that also. If you are new to the forum see the link below:
http://forums1.itrc.hp.com/service/forums/helptips.do?admit=716493758+1085211538437+28353475#33

Keep forumming..
Regards,



You need to know a lot to actually know how little you know