LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-08-2019, 02:10 AM   #1
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Rep: Reputation: Disabled
I am using wazuh and get alert SSH Configuration - Empty passwords permitted


mail->rootcheck Rule: 516 (level 3) -> 'System Audit event.' System Audit: CIS - RHEL7 - 6.2.9 - SSH Configuration - Empty passwords permitted {CIS: 6.2.9 RHEL7} {PCI_DSS: 4.1}. File: /etc/ssh/sshd_config. Reference: https://benchmarks.cisecurity.org/to...ed_Hat_Enterpr ise_Linux_7_Benchmark_v1.1.0.pdf . title: CIS - RHEL7 - 6.2.9 - SSH Configuration - Empty passwords permitted file: /etc/ssh/sshd_config

What does it mean with SSH Configuration - Empty passwords permitted?

I found this on redhat archive :

On a standard installation of FC1 and FC2 (and FC3?) is permit to login with a user with a empty password ... is this correct?

How to disable this "feature"?
 
Old 02-08-2019, 07:59 AM   #2
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by muqor View Post
File: /etc/ssh/sshd_config

How to disable this "feature"?
Edit the file mentioned above and look for the PermitEmptyPasswords entry.
Make sure that it's NOT commented out and that it is followed by "no", so it should look like
Code:
PermitEmptyPasswords no
Then restart the sshd daemon to have it REread its config file.
 
Old 02-08-2019, 08:05 AM   #3
muqor
LQ Newbie
 
Registered: Feb 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
I found this :

[root igloo root]# man sshd_config
> PermitEmptyPasswords
> When password authentication is allowed, it specifies whether the
> server allows login to accounts with empty password strings. The
> default is ânoâ.
[root igloo root]# grep PermitEmptyPasswords /etc/ssh/sshd_config
#PermitEmptyPasswords no
[root igloo root]# useradd nopasswd
[root igloo root]# passwd -d nopasswd
Removing password for user nopasswd.
passwd: Success
[root igloo root]# ssh nopasswd localhost
nopasswd localhost's password: <type ENTER>
Permission denied, please try again.
nopasswd localhost's password: <type "x" then ENTER>
[nopasswd igloo nopasswd]$ id
uid=505(nopasswd) gid=507(nopasswd) gruppi=507(nopasswd)
[nopasswd igloo nopasswd]$

And they answer like this

> How to disable this "feature"?

Put a non working shell as default for this user.

[root igloo root]# useradd -s /sbin/nologin nopasswd

If you've got it already created use,

[root igloo root]# usermod -s /sbin/nologin nopasswd


Could you explain this ?

Thanks
 
Old 02-08-2019, 08:20 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,757

Rep: Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930
Welcome to LinuxQuestions.

I am not familiar with wazuh.
Quote:
What does it mean with SSH Configuration - Empty passwords permitted?
If your user has an empty password the ssh server allows you to login without password authentication. To disable this feature the following option would be in your sshd_config file.

PermitEmptyPasswords no

In addition the sshd_config contains many options and there default settings but can be commented and shown for information purposes. It depends on the ssh server version but with RHEL 7 as far as I know the default is no and therefore if it isn't in your sshd_config file or just a comment your ok.

I don't remember what ssh version ran on FC1,2 or 3 nor its default settings anymore. Since they are no longer supported you should not be running them anyway (there are always exceptions...) Adding the above line should work with those distributions too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OPENNMS -how can i get disk space alert & memory alert BY MAIL saravanakumar Linux - Server 11 05-30-2014 08:45 AM
yum update and !!! - Is it an alert? An alert to what problem? BASmith Linux - Software 5 07-24-2012 09:02 AM
SIOCSIFFLAGS: Operation not permitted SIOCSIFFLAGS: Operation not permitted sushan1982 Linux - Wireless Networking 1 01-01-2012 08:04 PM
how to convert user passwords and group passwords using pwconv? dolceinter1 Linux - Security 2 11-04-2008 10:03 PM
ALERT!!! ALERT!!! I messed up the UNIX!!! Firew Linux - Software 1 11-05-2001 11:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration