Operating System - HP-UX
1826388 Members
4569 Online
109692 Solutions
New Discussion

disable direct root login

 
joseph51
Regular Advisor

disable direct root login

How can we disable the direct loging to hPUX 11.11. server.
I want block the direct root login to HPUX boxes.Only login option is that login with their own user name and then su - root.

I have tried to set this by adding the entry "PermitRoolLogin=No" in sshd_config file.And restarted the sshd service using the command.
/sbin/init.d/secsh stop and start

.but this configuration is not wrking,stll i am able to login as root.How can i configure this .please tell me
3 REPLIES 3
raiden
Regular Advisor

Re: disable direct root login

Hi Binu,


Create a file /etc/securetty and make a entry as follow:

console

It means the you can login to root only through the console.

joseph51
Regular Advisor

Re: disable direct root login

Raiden,thanks for the replay. I got the solution.

The entry console in /etc/securetty will not prevent direct root login.For that we need to do like this

echo "PermitRootLogin no ">> /opt/ssh/etc/sshd_config

restart sshd
/sbin/init.d/secsh stop
/sbin/init.d/secsh start

NOw it working for my server

.Insted of /opt/ssh/etc/ i create the file in /etc/.that was the issue.
joseph51
Regular Advisor

Re: disable direct root login

i found the solution