-1

My suse linux systems stores user password in MD5 format in /etc/shadow file. I want to change it to sha512.

Is there any command line tool available for that ?

Théo Capdet
  • 1,042
  • 3
  • 18
  • 34
BEPP
  • 875
  • 1
  • 12
  • 36

2 Answers2

1

I'm not sure the previous answer is actually what he's asking, it's not just that he wants to hash A password, it's changing the mechanism by default to a more secure one.

It's pretty ugly, you'll have to parse out the relevant sections from this VMWare posting....

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1032666

0

Here's a one liner:

python -c 'import crypt; print crypt.crypt("test", "$6$random_salt")'

6 is the type of hash for SHA-512

Taken from : https://serverfault.com/questions/330069/how-to-create-an-sha-512-hashed-password-for-shadow

Community
  • 1
  • 1
Igor Beaufils
  • 848
  • 2
  • 12
  • 29