Operating System - HP-UX
1755127 Members
3290 Online
108830 Solutions
New Discussion юеВ

Restrict the access to hpux system

 
SOLVED
Go to solution
Jorge Prado T._1
Occasional Contributor

Restrict the access to hpux system


Hi,
S.O. HP-UX 11i
In order to restrict the access to the system in temporary form, can be changed to the file passwd? And to return to normality, to restitute the original file of passwd?

Thank in advance
Jorge Prado T.
3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: Restrict the access to hpux system

Sure, that is one way to do it.

Make a copy of /etc/passwd. Remove the users you don't want to login. Then when they can log in again, copy the original /etc/passwd back into place.

Rodney Hills
Honored Contributor

Re: Restrict the access to hpux system

I modified /etc/profile to look to see if file /tmp/nologin exists and if it does, it exits with a message the system is not available. Then if I want to prevent users from logging in, I enter "touch /tmp/nologin"

HTH

-- Rod Hills
There be dragons...
UNIX Admin Group_1
Occasional Advisor

Re: Restrict the access to hpux system

Put this in your /etc/default/security file
## Non-root users cannot login if /etc/nologin exists - displays contents
NOLOGIN=1

If the /etc/nologin file exists, it's content is printed on the screen and login is denied

From man security:

NOLOGIN This parameter controls whether non-root login can be disabled by the /etc/nologin file.

NOLOGIN=0 Ignore the /etc/nologin file and do not exit if the /etc/nologin file exists.

NOLOGIN=1 Display the contents of the /etc/nologin file and exit if the /etc/nologin file exists.

Default value: NOLOGIN=0