Solved

Cron Deamon email alerts - Warning: The SSH configuration option 'PermitRootLogin' has not been set.          The default value may be 'yes', to allow root access.

Posted on 2011-02-11
7
971 Views
Last Modified: 2012-05-11
I have a Cron Deamon email alerts that says the following below. How do I fix this.


[ Rootkit Hunter version 1.3.8 ]

Checking rkhunter data files...
  Checking file mirrors.dat                                  [ No update ]
  Checking file programs_bad.dat                             [ No update ]
  Checking file backdoorports.dat                            [ No update ]
  Checking file suspscan.dat                                 [ No update ]
  Checking file i18n/cn                                      [ No update ]
  Checking file i18n/de                                      [ No update ]
  Checking file i18n/en                                      [ No update ]
  Checking file i18n/zh                                      [ No update ]
  Checking file i18n/zh.utf8                                 [ No update ]
[ Rootkit Hunter version 1.3.8 ]
File updated: searched for 164 files, found 141
Warning: The SSH configuration option 'PermitRootLogin' has not been set.
         The default value may be 'yes', to allow root access.
Warning: Hidden directory found: /dev/.udev
Warning: Hidden file found: /etc/.logrotate.conf.swp: data
Warning: Hidden file found: /usr/bin/.ssh.hmac: ASCII text
Warning: Hidden file found: /usr/bin/.fipscheck.hmac: ASCII text
Warning: Hidden file found: /usr/sbin/.sshd.hmac: ASCII text
0
Comment
Question by:sobeservices2
  • 3
  • 2
  • 2
7 Comments
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 300 total points
ID: 34872348
Hi,

seems that you have a Rootkit Hunter script which would check several security relevant parameters.

Your sshd_config file does not contain the parameter PermitRootLogin. Since the default is "Yes" this is obviously considered a security issue.

You will have to decide whether your'e further going to permit root login via ssh or not.

If you want to forbid it just add "PermitRootLogin no" to sshd config.

If you must allow root to login via ssh you will have to live with that message, or maybe you could configure the Rootkit Hunter progran to ignore this parameter.
Since I don't know this program I will not be able to help you with this without some googling.

wmp
0
 

Author Comment

by:sobeservices2
ID: 34872432
Yes I need root to be able to login via ssh?

Humm maybe I can find something hope to get some post here
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 300 total points
ID: 34872582
Please look at /etc/rkhunter.conf

There is a setting

ALLOW_SSH_ROOT_USER=no

Change it to "yes" and the message will no longer appear.

wmp
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 6

Assisted Solution

by:t-max
t-max earned 200 total points
ID: 34872597
If you need your system to be more secure, you should add the line:
PermitRootLogin no

Open in new window

To the file /etc/ssh/sshd_config

This line means that you can't log through ssh using the user "root". This avoid for example a brute force attack on it.
To use "root" with the option above, you need to ssh to the computer with a regular user, and then you need to write "su -" to get the root identity and privileges.

If you don't care about security much (eg: because it's an internal network), then add the same line but with "yes" instead. This should avoid the message you get from rkhunter.

Whatever you decide, after changing /etc/ssh/sshd_config, you need to restart the sshd service. Do that with "/etc/init.d/sshd restart".
0
 

Author Comment

by:sobeservices2
ID: 34872632
Ok cool

So I could ssh into my server as a regular user the just type in su and I become root?

How can I make a regular user?
I have cpanel on my server?
0
 
LVL 6

Assisted Solution

by:t-max
t-max earned 200 total points
ID: 34872781
Of course, you just do "su -" (or just "su" if you want to keep your environment variables) and that "upgrades" your normal user to root.
I'm not sure which system you have, but there's usually a script called "useradd" or "adduser" which does exactly that. Put "--help" at the end to get details on how to use it, or try with "man useradd". I'm sorry but can't help you with cPanel.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 300 total points
ID: 34875175
In most cases you're not allowed to have more than one cPanel account.

But if you really have "root" access (not "admin" or the like) and if you can open a shell (command line) it should be possible.

If you need this user only to avoild using ssh as root just issue:

useradd -g users sobeservices2

passwd sobeservices2
- type a new password when prompted (twice)

You will be requested to change the password when first logging in as sobeservices2

Don't forget to change /etc/ssh/sshd_config ("PermitRootLogin no") and to restart sshd.

wmp
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 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