?
Solved

PermitRootLogin

Posted on 2009-07-16
6
Medium Priority
?
364 Views
Last Modified: 2013-11-08
I'm confused about PermitRootLogin settings. It seems I need to set it off because of security reasons. But how can I reach my server with root-like permissions. I dont know how can I give root permissions to user?  I heard about "sudo" but I dont have any idea about that too.
0
Comment
Question by:middleofnowhere
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 29

Accepted Solution

by:
fosiul01 earned 2000 total points
ID: 24867574
Ok
its always good to use PerminRootLogin  = No
so hacker woudl not be able to login as root, incase your password is compromised

how ever, work way round is

sudo or su -

if you have sudo installed in your centos

then type

visudo

you will see a line call

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL     ------------------------------------------------------->
username  ALL=(ALL)       ALL

you just need to add username with ALL=(ALL) ALL  ( as written above)


now login to the server with username

now if you want to do any administrative task

type

sudo
it will ask for pasword, give it the password

now you will become root user


or after login to server as normal user type su -
it will ask for root password, after giving it,you will change to root user

i will sent you some other article aswell



0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24867588
0
 

Author Comment

by:middleofnowhere
ID: 24867678
quick and precise :)
thats great now I set it. I'd like to ask that what can I do for increasing security of my server? do you have any specific suggestions or guide?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 29

Expert Comment

by:fosiul01
ID: 24867774
yes
lots of things you can do and you should do

1. use portsentry , fail2 ban ( read in google what they does)
2. dont run unnecessary service
3. tight down your server with firewall rules
4 use snort  ( read in google what it do )
0
 
LVL 29

Expert Comment

by:fosiul01
ID: 24867787
0
 

Author Comment

by:middleofnowhere
ID: 24867794
thats great! thanks
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question