LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-18-2011, 03:58 PM   #1
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Rep: Reputation: 113Reputation: 113
Preventing root login


I was wondering what is the best way to disable the root account on centOS 5.7 32bit?

Quote:
usermod -L root # this is what I would prefer but will it work on root account??
or
echo > /etc/securetty # This would work but if I wanted to reenable it I would have to recreate this file.
Is there any other recommend way? I disabled it via sshd_config as well.


If you ask why I want to completely disable root its because I don't need it with sudo and even though I disabled the login via sshd_config I can still go root with
Quote:
$su
password:
and it still allows me to login.

Thanks.

Last edited by jmc1987; 11-18-2011 at 04:22 PM.
 
Old 11-18-2011, 04:15 PM   #2
jthill
Member
 
Registered: Mar 2010
Distribution: Arch
Posts: 211

Rep: Reputation: 67
The pretty way is `sudo usermod -L root`.
 
1 members found this post helpful.
Old 11-18-2011, 04:22 PM   #3
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7/10
Posts: 879

Original Poster
Rep: Reputation: 113Reputation: 113
Quote:
Originally Posted by jthill View Post
The pretty way is `sudo usermod -L root`.
Yea thats what I was thinking would be the best. Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
SELinux preventing cvs login bullet45 Linux - Software 1 01-24-2007 05:00 AM
GNOME Session Manager Preventing Login jamberu Linux - Software 1 05-28-2005 08:49 PM
Preventing Login rickseiden Linux - Security 3 12-01-2004 02:45 PM
Preventing root processes... znapper Linux - Security 5 03-18-2004 12:18 PM
preventing root login nuttyvishal4u Linux - Newbie 6 01-07-2003 11:14 PM

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

All times are GMT -5. The time now is 11:02 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration