Solved

PermitRootLogin

Posted on 2009-07-16
6
360 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 500 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Experts-Exchange users below are the steps you can follow to upgrade your Lync server to latest CU's or cumulative updates. Note: Perform it during non-production hours.   Step 1: Backup your lync and SQL server database. Follow below article: h…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

695 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