LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-12-2005, 09:26 PM   #1
Milosevic
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
liamoboyle
Member
 
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
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
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. . . .
 
  


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:07 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