(zettel (meta (back "00001004050000 00001006020000") (backward "00001004050000 00001006020000 00001010040200") (box-number "1") (created "00010101000000") (forward "00001006050000 00001010040200") (modified "20210712234305") (published "20210712234305") (role "manual") (syntax "zmk") (tags "#command #configuration #manual #zettelstore") (title "The ''password'' sub-command")) (rights 4) (encoding "") (content "This sub-command is used to create a hashed password for to be authenticated users.\n\nIt reads a password from standard input (two times, both must be equal) and writes the hashed password to standard output.\n\nThe general usage is:\n```\nzettelstore password IDENT ZETTEL-ID\n```\n\n``IDENT`` is the identification for the user that should be authenticated.\n``ZETTEL-ID`` is the [[identifier of the zettel|00001006050000]] that later acts as a user zettel.\n\nSee [[Creating an user zettel|00001010040200]] for some background information.\n\nAn example:\n\n```\n# zettelstore password bob 20200911115600\nPassword:\n Again:\ncredential: $2a$10$1q92v1Ya8Too5HD/4rKpPuCP8fZTYPochsC6DcY1T4JKwhSx8uLu6\nuser-id: bob\n```\n\nThis will produce a hashed password (\"\"credential\"\") for the new user \"\"bob\"\" to be stored in zettel \"\"20200911115600\"\".\n\nYou should copy the relevant output to the zettel of the user to be secured, especially by setting the meta keys ''credential'' and ''user-id'' to the copied values.\n\nPlease note that the generated hashed password is tied to the given user identification (''user-id'') and to the identifier of its zettel.\nChanging one of those will stop authenticating the user with the given password.\nIn this case you have to re-run this sub-command."))