Operating System - HP-UX
1849147 Members
5407 Online
104041 Solutions
New Discussion

Re: restricting normal user logins

 
dhanish
Regular Advisor

restricting normal user logins

Hi,
Please let me know how can i restritcy any normal user login in HPUX,As i am going to do some admin work on the system and i do not want any user to login except root.It is same like /etc/noilogin file on Sun Solaris
Never Say Die
10 REPLIES 10
Pete Randall
Outstanding Contributor

Re: restricting normal user logins

Result from a search on "restrict user login":
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd686663ce855d511abcd0090277a778c,00.html

HTH,
Pete

Pete
Peter Kloetgen
Esteemed Contributor

Re: restricting normal user logins

Hi Nitin,

you can simply comment out all user entries in /etc/passwd by putting a # in front of the line. This would do it for you.

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping
PIYUSH D. PATEL
Honored Contributor

Re: restricting normal user logins

Hi,

1. The best is to go to boot the system in single user mode and do the admin work.

2. init s ( this is same as the single user mode but here all the filesystems are also mounted )

I dont think that there is such a file or similar file called /etc/noilogin in HPUX.

Piyush
dhanish
Regular Advisor

Re: restricting normal user logins

Hi,
I am not using local /etc/passwd , my machine is NIS client.
Never Say Die
Pete Randall
Outstanding Contributor

Re: restricting normal user logins

Pete Randall
Outstanding Contributor
Nick Wickens
Respected Contributor

Re: restricting normal user logins

Kick everyone out of the system, logon to the console and disable the lancard with ifconfig.

Hats ? We don't need no stinkin' hats !!
Sean McConkey_2
Advisor

Re: restricting normal user logins

Personally one of the most I find one of the most efficient way's of doing this modify everyones shell to a menu script. This is far more secure in the first instance then giving people access to the shell.

I used a script that would only allow certain people access to the shell, ie developers not normal users.

When you want to restrict logins all you do is rename the original script and have a script that displays a message and immediately exits.

That way users get a message and don't start ringing you up when you are busy saying I can't get in.

HTH

Sean
You did what with rm -r!!!!!
Sanjay_6
Honored Contributor

Re: restricting normal user logins

Hi Nitin,

Try this link. It may work, but you need the latest login patch on the system for this,

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

Hope this helps.

Regds
MANOJ SRIVASTAVA
Honored Contributor

Re: restricting normal user logins

Hi Nitin


There is another way too

in /etc/profile jsut add the following lines

loginid=`who am i | awk '{print $1}'`

echo $loginid
if [ $loginid ! = root ]
then
exit
fi

this will throw otu anyone who is not root.


Manoj Srivastava