Solved

PermitRootLogin

Posted on 2009-07-16
6
353 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
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.

 
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

Creating a Samba server for a small office. Ubuntu Linux and Samba can breathe new life into a retired PC and save an office money on new hardware/software. Our example server will have two hard disks, one exclusively for storing shared data. …
Introduction: Sometimes when I receive a call from my users to solve their problems it is very difficult for me to found their computer IP address. Even finding their computer Host to provide remote support can be a problem.  So I resorted to Goo…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 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