LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   stopping direct root access howto ? (https://www.linuxquestions.org/questions/linux-newbie-8/stopping-direct-root-access-howto-4175427278/)

ratotopi 09-14-2012 12:28 PM

stopping direct root access howto ?
 
I am trying to stop the direct root access to CentoS 6 box so made sure all the line in the file /etc/securetty is commented out. Now when I try to login as root using putty I get the message Access denied but it still ask for password and once you provide the password it let you in. I know I can stop it using the sshd_config files PermitRootLogin no but I am sure I was able to stop root access just using the /etc/securetty longitme back. I am running CentOS on VMware ESxi, does it have anything to do with it? Thank you for you help.

unSpawn 09-14-2012 01:56 PM

Quote:

Originally Posted by ratotopi (Post 4780468)
when I try to login as root using putty I get the message Access denied but it still ask for password and once you provide the password it let you in.

Change these as well:
- /etc/security/access.conf:
Code:

-:ALL EXCEPT root:tty1
+ : root : cron crond nobody :0 tty1 tty2 tty3 tty4 tty5 tty6
+ : root : 127.0.0.1
- : root : ALL

- /etc/ssh/sshd_config:
Code:

PermitRootLogin no
PasswordAuthentication no



All times are GMT -5. The time now is 06:17 AM.