Version 2 (modified by Lllama, 10 years ago) (diff)


The Admin Application - Common pitfalls

Creating new users


One FAQ about the admin app is how to create new users. In particular how to set the password. It has been decided (and mooted on the lists) that the password field will only accept password hashes rather than plain text password. The problem is how does one generate these hashes. The following script will generate passwords on the command line. Run it with: python <scriptname> <password> and you'll get the correct output to paste into the admin app. IMPORTANT SECURITY NOTE: Users of insecure operating systems (such as Linux) will have the plaintext password in their shell history. ;-)

import sha, random, sys
    raw_password = sys.argv[1]
except IndexError:
    print "Oh your Designer. You only had to type one thing in. How easy do I have to make it for you?"
algo = 'sha1'
salt =[:5]
hsh =
print "%s$%s$%s" % (algo, salt, hsh)
Back to Top