Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-12-2005, 09:26 PM   #1
LQ Newbie
Registered: Nov 2005
Posts: 19

Rep: Reputation: 0
How to encrypt a password to the /etc/shadow file?

Does anybody know how to encrypt a password in order to fill the password field in the /etc/shadow file?

Cheers, Milosevic.
Old 12-12-2005, 09:30 PM   #2
Registered: Mar 2004
Location: Wellington, New Zealand
Distribution: Debian
Posts: 127

Rep: Reputation: 15
Run "mkpasswd -H md5"
Enter password
An md5 hash that will work in /etc/shadow will be output

Generally just use passwd to change your password and (as root) passwd -u username to change the password for username.
Old 12-13-2005, 02:14 PM   #3
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,893

Rep: Reputation: 1357Reputation: 1357Reputation: 1357Reputation: 1357Reputation: 1357Reputation: 1357Reputation: 1357Reputation: 1357Reputation: 1357Reputation: 1357
You should not have to touch the shadow file!

If you have shadowing enabled, the ordinary passwd command will update the password-value into the shadow-file, putting a dummy placeholder in the visible file.

And I hope that you have Tripwire and so-forth, so that any sneaky hacker's attempt to diddle with the file manually, to change a password without the knowledge of system administrators, will be instantly detected. . . .


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Apache and shadow password file fortezza Linux - Security 2 07-31-2005 06:49 PM
Encrypt a partition with a password ? Coume Linux - Security 1 04-26-2005 03:00 PM
How can i encrypt the password in .fetchmailrc?? Wimpie22 Linux - Networking 2 05-25-2004 08:52 PM
Encrypt password for /etc/shadow - SunOS liguorir Linux - Software 1 05-06-2004 10:28 PM
password protect/encrypt a single image bruce1271 Linux - Software 2 10-18-2003 08:29 PM

All times are GMT -5. The time now is 08:05 PM.

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