• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

error: Could not get shadow information for root

January 17, 2015 by Sharad Chhetri

Recently created rpm package from OpenSSH 6.7 tar ball package. After successfully creating rpm and upgrading the OpenSSH server, met with issue – error: Could not get shadow information for root .
Given below is some section of the error found in messages log (/var/log/messages)

Jan 17 11:21:17 localhost systemd: Started SYSV: OpenSSH server daemon.
Jan 17 11:21:26 localhost sshd[6426]: Connection closed by 192.168.56.1 [preauth]
Jan 17 11:21:29 localhost sshd[6443]: error: Could not get shadow information for root
Jan 17 11:21:29 localhost sshd[6443]: Failed password for root from 192.168.56.1 port 51041 ssh2

NOTE: The problem found in CentOS 7.

The issue was coming due to use to user’s password which we have set in system. Here, we were using root user and password should be checked from shadow file. Hence, the pam file (/etc/pam.d/sshd) also play role here.

The conclusion is enable the UsePAM parameter in sshd_config.

Now we will enable the UsePAM parameter in /etc/ssh/sshd_config file.
Search for keyword UsePAM in /etc/ssh/sshd_config and make it yes.

vi /etc/sshd/sshd_
..
UsePAM yes
..

Now restart the sshd service.

systemctl restart sshd

Try once again doing ssh from remote server. I hope the issue will be resolved. If still facing issue, check the /var/log/messages and /etc/ssh/secure log for more troubleshooting.

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. How To Get SSH Public Key Fingerprint Information
  2. how to deny root ssh access in linux server
  3. fatal error: error writing to /tmp/ccwAjc9Z.s: No space left on device
  4. error: The requested URL returned error: 403 Forbidden while accessing Github repo
  5. dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu
  6. In ESX , passwd: authentication information cannot be recovered
  7. This XML file does not appear to have any style information associated with it, RSS Feed problem(wordpress)
  8. How to hide php version information in header
  9. type Command : Display Information About Command Type On Linux
  10. CentOS 7 / RHEL 7 : Reset / Recover forgotten root password

Filed Under: SSH Tagged With: ssh

Reader Interactions

Comments

  1. sky says

    July 20, 2017 at 8:44 am

    I changed pam to yes according to what you said,but met with issue:sshd(1209): Failed password for user from ip port *** ssh2(/var/log/messages)

    centos-6.5 openssh-7.5

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to download package using apt-get command in ubuntu

error command ‘gcc’ failed with exit status 1 in Ubuntu

How to create a file with cat command

Convert video file into gif file through command line in linux

How to configure ethernet in CentOS 6 after installing in Virtual Box

Allow wget and yum in iptable

How to hide php version information in header

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ·
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy