Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic

Passwords in Database?
Encrypted  100%  [ 16 ]
PlainText  0%  [ 0 ]
Total votes : 16
Author Message
PostPosted: Wed Sep 02, 2009 4:42 am 
Offline
Senior Member
User avatar

Joined: Tue Aug 17, 2004 11:37 pm
Posts: 262
Website: http://www.our-lan.com
WLM: nf@our-lan.com
Location: Brisbane, Australia
Gday All,

Do you store your user passwords in plaintext or encrypted

A question for those of you who do virtual hosting of email/ftp and other services. Looking at how hard it is to get an encryption standard that works across all, and the very limited support of standards in clients, do you bother encrypting the password in the database?

Articles from Dovecot (http://wiki.dovecot.org/Authentication/Mechanisms) under the non plaintext auth methods, imply bad client support for different encryption methods, and im pretty sure proftpd does the same. (And yes, lets ignore the use of unsecure ftp for the moment)

So to the linode community, what do you do?

_________________
ServerAdmin - www.our-lan.com
"Diplomacy is the art of saying nice doggy whilst looking for a really big stick"
"In my experiece, any attempt to make any system idiot proof will only challenge God to make a better idiot"


Top
   
 Post subject:
PostPosted: Wed Sep 02, 2009 9:19 am 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
Encrypted. Always.

Both e-mail and FTP passwords are encrypted with the MySQL ENCRYPT function in our databases.

I also use this kind of thinking when creating websites that use a username and password to log in.


Top
   
 Post subject:
PostPosted: Wed Sep 02, 2009 4:30 pm 
Offline
Senior Member

Joined: Mon Jun 16, 2008 6:33 pm
Posts: 151
Only encrypted / hashed (edited due to witty comments below ;) ).

Dovecot and exim4 were a bit of a fiddle to get working correctly with php's sha1(), but no complaints about the less standards-compliant clients (yet).


Last edited by mjrich on Wed Sep 02, 2009 11:04 pm, edited 2 times in total.

Top
   
 Post subject:
PostPosted: Wed Sep 02, 2009 10:03 pm 
Offline
Senior Newbie

Joined: Sat Aug 15, 2009 4:33 pm
Posts: 5
You forgot to add hashed (sha1, md5, etc.).

Encryption(two way can be decrypted back into original password):
plaintextpassword->encryptionkey->encryptedpassword
encryptedpassword->encryptionkey->plaintextpassword

Hashing (supposedly one way):
plaintextpassword->hashedpassword+anyextrastuffyouwanttoaddinlikesalt->finalhashedpassword
finalhashedpassword->nowaytogetfinalhashedpasswordinplaintextunlessyoualreadyknowwhattheplaintextpasswordisalready

The only way to get the password would be to come up with the plain text equivalent of the hashed value, even if you do not have the original there is a change that you might come into another plaintext value that has the same hash eventually.


Top
   
PostPosted: Wed Sep 02, 2009 10:14 pm 
Offline
Senior Member

Joined: Sat Mar 28, 2009 4:23 pm
Posts: 415
Website: http://jedsmith.org/
Location: Out of his depth and job-hopping without a clue about network security fundamentals
Internat wrote:
Do you store your user passwords in plaintext or encrypted

When I come across an unsalted, non-hashed plaintext password...I'm frankly staggered.

_________________
Disclaimer: I am no longer employed by Linode; opinions are my own alone.


Top
   
PostPosted: Wed Sep 02, 2009 11:09 pm 
Offline
Senior Member
User avatar

Joined: Mon Jul 21, 2008 1:26 pm
Posts: 171
Website: http://www.rejecttheherd.net
Location: Seattle
jed wrote:
Internat wrote:
Do you store your user passwords in plaintext or encrypted

When I come across an unsalted, non-hashed plaintext password...I'm frankly staggered.


I just say ..... keeps me employed ;)

_________________
Image
Where "Thought Crime" is commited
http://www.rejecttheherd.net


Top
   
 Post subject: Hashed all the way
PostPosted: Fri Sep 04, 2009 3:18 am 
Offline
Junior Member

Joined: Fri Oct 24, 2008 4:56 pm
Posts: 28
Website: http://matiaskorhonen.fi
Exactly, storing plain text passwords is completely irresponsible. I also feel that sotoring encrypted passwords should be avoided if at all possible (they can still be compromised if the key leaks and the administrator still has access to all his users' passwords).

Hashed and salted with sha1 or better is the way to go. And make sure you use a unique salt for each password, otherwise the purpose of the salt will be defeated.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group