Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
themerdark
insert into PM_USER_DATA
(user_id, full_name, password, status_cd)
values
('shrine', 'SHRINE User', '9117d59a69dc49807671a51f10ab7f', 'A');
 
-- The password hash you see above is for 'demouser' . Use something else.

insert into PM_PROJECT_USER_ROLES
(PROJECT_ID, USER_ID, USER_ROLE_CD, STATUS_CD)
values
('SHRINE', 'shrine', 'USER', 'A');

insert into PM_PROJECT_USER_ROLES
(PROJECT_ID, USER_ID, USER_ROLE_CD, STATUS_CD)
values
('SHRINE', 'shrine', 'DATA_OBFSC', 'A');


A brief note of explanation is in order for the insert statement for the PM_USER_DATA table.  The value for the password field is actually a modified MD5 hash of the actual password.  However, to the best of our knowledge, a standard MD5 algorithm does not always generate the correct hash in this situation.  Instead, the following python script should be used to generate the hash:


Code Block
languagepy
themeRDark
titlepython MD5 hash generator
import hashlib
import string
import struct
import sys

def i2b2_pass(passwd):
    md5 = hashlib.md5()
    md5.update(passwd)
    digest = md5.digest()
    byte_list = []
    for b in digest:
        byte_list.append("%x" % struct.unpack('B', b))
    return string.join(byte_list, '')

def main():
    if len(sys.argv) != 2:
        print("usage: %s passwd" % sys.argv[0])
        sys.exit(1)
    passwd = sys.argv[1]
    print("%s" % i2b2_pass(passwd))

if __name__ == "__main__":
    main()

You should save this code to your local disk, set its execute bit, and then run the code like this, and if your syntax is correct, the program should display the correct hash that you can use to create the user as indicated above:

Code Block
languagebash
themeRDark
titlerunning python MD5 hash generator
$ python i2b2_hash_generator.py <insert_your_human-readable_password>