====== radicale ====== ===== Installation ===== https://ho2e.de/dokuwiki/doku.php?id=texte:radicale_installieren > nano Radicale-*/radicale/auth/htpasswd.py import bcrypt einfügen nach der Zeile import os außerdem müssen folgende Zeilen an das Ende der Datei eingefügt werden def _bcrypt(hash_value, password): """Check if ``hash_value`` and ``password`` match using bcrypt method.""" hash_value = hash_value.encode("ascii") password = password.encode(config.get("encoding", "stock")) return bcrypt.checkpw(password, hash_value) > cd ~ > nano add-user.py #!/usr/bin/env python import bcrypt from optparse import OptionParser parser = OptionParser() parser.add_option("-u", "--user", dest="username", help="Username") parser.add_option("-p", "--password", dest="password", help="Password which will be hashed using bcrypt") parser.add_option("-w", "--workfactor", dest="workfactor", default="12", help="Workfactor of bcrypt, the higher the more secure") (options, args) = parser.parse_args() if options.username == None or options.password == None: parser.print_help() else: hashed = bcrypt.hashpw(options.password, bcrypt.gensalt(int(options.workfactor))) with open("/etc/radicale/users", "a") as configfile: configfile.write(options.username + ":" + hashed + "\n") print "Radicale user created" Erstellen Radicale-Benutzer_innen: > python /home/radicale/add-user.py -u USERNAME -p PASSWORD ===== Update ===== ? ===== Siehe auch ===== [[texte:radicale_installieren|Raspberry Pi: Radicale CalDAV und CardDAV Server installieren]]