Using useradd/usermod -p [password] does not encrypt the password in the /etc/shadow file

Solution Verified - Updated -

Issue

  • Using useradd -p [password] or usermod -p [password] does not encrypt the password in the /etc/shadow file, it updates shadow file with plain text password and the user get access denied during login.

For Example

# useradd -m -s /bin/csh -pMonday test
# getent shadow test
test:Monday:15054:0:99999:7:::

Environment

  • Red Hat Enterprise Linux 4/5/6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.