Solved

PermitRootLogin

Posted on 2009-07-16
6
352 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
  • 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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
This is a fairly complicated script that will install the required prerequisites to install SCCM 2012 R2 on a server.  It was designed under the functional model in order to compartmentalize each step required, reducing the overall complexity.  The …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now