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
988 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
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.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

860 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