1847253 Members
4152 Online
110263 Solutions
New Discussion

Re: remote root login

 
SOLVED
Go to solution
himacs
Super Advisor

remote root login

Hi,

Can anbody tell me how to check remote root login enabled or not?

In solaris we have /etc/default/login file.
We have to uncomment the /dev/console field.

Is ther any way to check the same in hp-ux?

Regards,

12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: remote root login

Shalom,

This is somewhat dependent on connection protocol.

ssh:

http://docs.hp.com/en/5992-3387/ch05s06.html

DCE

http://docs.hp.com/en/5991-7712/ch02s04.html

telnet et al
http://docs.hp.com/en/5992-3387/ch05s01.html

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Tingli
Esteemed Contributor

Re: remote root login

For telnet the file is /etc/securetty. For ssh it is /opt/ssh/etc/sshd_conf.
himacs
Super Advisor

Re: remote root login

Hi guys

I dont want to any user to use root account on the network.Only thro direct console only root should work.

regards,
Tingli
Esteemed Contributor
Solution

Re: remote root login

That is right. To block root login from non-console you need to:
1) echo console >> /etc/securetty
2) In file /etc/ssh/sshd_conf, you need to set "PermitRootLogin no"
Tingli
Esteemed Contributor

Re: remote root login

Sorry, the file sshd_conf is located in /opt/ssh/etc.
himacs
Super Advisor

Re: remote root login

Hi Tinqli,

Thnks for the response.

Can u please brief me about the
echo console>>/etc/security.

Regards,
Tingli
Esteemed Contributor

Re: remote root login

Or you can edit the file /etc/securetty. And add a line "console" to the end of the file.
himacs
Super Advisor

Re: remote root login

Hi Tinqli,

I didnot find any file named /etc/security and /etc/securetty.Is this default one or we need to create manually?

Regards,

Tingli
Esteemed Contributor
himacs
Super Advisor

Re: remote root login

Hi Tinqli,

Thanks for ur timely response.

As m new in hp-ux, i have some doubts.

/etc/securetty file is default one or manually we need to create?

becuase i didnot find the same in my system.

regards,
Patrick Wallek
Honored Contributor

Re: remote root login

You must create it.

The easiest way:

# echo console > /etc/securetty
Sani
Frequent Advisor

Re: remote root login

Hi Himacs ,

Through /etc/securetty and /opt/ssh/etc/sshd_conf , you can rstrict direct root login to the server.But at the same time any user can login with his username and switch to root (su -)....

To prevent this you have to add an entry in /etc/default/security file . ie

SU_ROOT_GROUP=group

Now users attempting to su to root must be a memeber of this group .

Thanks