Jump to:

23370 Posts in 18145 Topics by 2864 members

General Questions

SilverStripe Forums » General Questions » Manually create sha1 password/salt

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 2646 Views
  • DeklinKelly
    Avatar
    Community Member
    197 Posts

    Manually create sha1 password/salt Link to this post

    The DB contains these fields:

    Password
    s2z1w96s2804og888w4w48o8koogsgg    

    Salt
    45hjh3lh63cw8s84o8gso800c4skcsco0csoc08

    PasswordEncryption    
    sha1

    I want to manually change or add a password. But first I need to know how to create the sha1 password / salt

    Presuming the password is "password" how can I (with PHP) create the encrypted password / salt data?

  • DeklinKelly
    Avatar
    Community Member
    197 Posts

    Re: Manually create sha1 password/salt Link to this post

    How can I change the password using SQL?

    UPDATE `MemberPassword` SET `Password` = 'svhznj3i668w448owkwo8s0k4oo4s0d', `PasswordEncryption` = 'sha1', `Salt` = '1dsfj8i4swo0cowocgk88oo8woo0w4g80swswwk' WHERE `ID` = 1 LIMIT 1 ;
    UPDATE `Member` SET `Password` = 'svhznj3i668w448owkwo8s0k4oo4s0d', `PasswordEncryption` = 'sha1', `Salt` = '1dsfj8i4swo0cowocgk88oo8woo0w4g80swswwk' WHERE `ID` = 1 LIMIT 1 ;

  • CodeGuerrilla
    Avatar
    Community Member
    105 Posts

    Re: Manually create sha1 password/salt Link to this post

    I would also like to know how to manually generate the salt as I am importing a whole bunce of users from a legacy application and need to do this also.

    Any help appreciated.

    2646 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.