1837180 Members
2537 Online
110113 Solutions
New Discussion

securetty file problem

 
SOLVED
Go to solution
Sridhar R
Regular Advisor

securetty file problem

Hi,

This is a Bl860c server running HP-UX 11.23

My problem is:

I want to restrict root access i.e., only either via console or by su'ing to root.

I know that /etc/securetty file will do that.

I have created a file called securetty and added a single word console.

But still i am able to perform direct login via root.

Mind you, i am doing a ssh login since i have restricted telnet already.

Here is below details:

bidrprd2#cat /etc/securetty
console

bidrprd2#ll /etc/securetty
-r-------- 1 root sys 8 Sep 19 03:29 /etc/securetty


What could be done for this?

Thanks in Advance!

Sridhar

3 REPLIES 3
Ivan Krastev
Honored Contributor
Solution

Re: securetty file problem

Are you trying to login with ssh ?
In the sshd_config file change "PermitRootLogin yes" to "PermitRootLogin no" and restart sshd daemon.

regards,
ivan


James R. Ferguson
Acclaimed Contributor

Re: securetty file problem

Hi Shridar:

In your '/opt/ssh/etc/sshd_config' change 'PermitRootLogin yes' [the default] to:

PermitRootLogin no

Regards!

...JRF...


Sridhar R
Regular Advisor

Re: securetty file problem

Thanks Ivan. Working now