des_crypt - Linux


des_crypt is an encryption tool used to create and verify DES-based encrypted passwords. It utilizes the Data Encryption Standard (DES) algorithm to secure data, making it useful for encrypting passwords or other sensitive information.


des_crypt [-s salt] password [salt]


-s salt:
Specifies the salt to use for encryption. If omitted, a random salt will be generated.


Simple Encryption:

echo "mypassword" | des_crypt

Using a Specific Salt:

echo "mypassword" | des_crypt -s 01234567


echo "mypassword" | des_crypt -s 01234567 | grep "$s01234567"

Common Issues

  • Invalid password: The password must be at least 8 characters long.
  • Incorrect salt: The salt provided must be exactly 8 characters long.


des_crypt can be used with other commands to automate password encryption and verification tasks. For example:

echo "user1:$(echo "mypassword" | des_crypt -s 01234567)" | chpasswd

Related Commands

  • crypt
  • openssl
  • md5sum