LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2012, 12:28 PM   #1
ratotopi
Member
 
Registered: Dec 2011
Posts: 114

Rep: Reputation: 6
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.
 
Old 09-14-2012, 01:56 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ratotopi View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Disable remote root access but allow local root access-- possible? bskrakes Linux - Security 4 02-21-2019 04:02 PM
Stopping non root users from being able to reboot a Linux server investmentbnker75 Linux - Security 3 10-30-2008 10:58 PM
HowTo Change Password direct on SquirrelMail Login Page satimis Linux - Server 2 12-10-2007 10:40 PM
How to :: Securing SSH: protocol SSH2 and hiding the direct access of root sysconfig Red Hat 3 09-07-2006 08:30 AM
Stopping the hourly mail to root Phaethar Linux - General 2 09-16-2005 02:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration