From f349f00244091e475695640b193b1d76abdb52c0 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 8 Nov 2008 21:56:52 +0000 Subject: we can only manage crypted passwords -> added a python script to generate these passwords --- password/openbsd/genpwd.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 password/openbsd/genpwd.py (limited to 'password') diff --git a/password/openbsd/genpwd.py b/password/openbsd/genpwd.py new file mode 100755 index 0000000..a64de57 --- /dev/null +++ b/password/openbsd/genpwd.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +import sys +# you nee to install the bcrypt python library to use that script +# debian, ubuntu: sudo apt-get install python-bcrypt +import bcrypt + +if len(sys.argv) != 2: + print sys.argv[0]+" password" + sys.exit(1) + +# Hash a password for the first time +print bcrypt.hashpw(sys.argv[1], bcrypt.gensalt()) -- cgit v1.2.3