{"id":275,"date":"2020-04-13T18:58:10","date_gmt":"2020-04-13T16:58:10","guid":{"rendered":"http:\/\/tietokanta.dy.fi\/linux\/?p=275"},"modified":"2022-02-16T18:46:27","modified_gmt":"2022-02-16T15:46:27","slug":"htpasswd-tiedoston-tekeminen","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/2020\/04\/13\/htpasswd-tiedoston-tekeminen\/","title":{"rendered":"htpasswd tiedoston tekeminen"},"content":{"rendered":"\n<p>.htpasswd tiedoston voi tehd\u00e4 terminaalissa k\u00e4ytt\u00e4en komentoa htpasswd. Alla valinnat ja k\u00e4ytt\u00f6:<br>Usage:<br>htpasswd [-cimBdpsDv] [-C cost] passwordfile username<br>htpasswd -b[cmBdpsDv] [-C cost] passwordfile username password<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    htpasswd -n&#91;imBdps] &#91;-C cost] username\n    htpasswd -nb&#91;mBdps] &#91;-C cost] username password<\/code><\/pre>\n\n\n\n<p>-c Create a new file.<br>-n Don&#8217;t update file; display results on stdout.<br>-b Use the password from the command line rather than prompting for it.<br>-i Read password from stdin without verification (for script usage).<br>-m Force MD5 encryption of the password (default).<br>-B Force bcrypt encryption of the password (very secure).<br>-C Set the computing time used for the bcrypt algorithm<br>(higher is more secure but slower, default: 5, valid: 4 to 31).<br>-d Force CRYPT encryption of the password (8 chars max, insecure).<br>-s Force SHA encryption of the password (insecure).<br>-p Do not encrypt the password (plaintext, insecure).<br>-D Delete the specified user.<br>-v Verify password for the specified user.<br>On other systems than Windows and NetWare the &#8216;-p&#8217; flag will probably not work.<br>The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.<\/p>\n\n\n\n<p>Esimerkiksi tehd\u00e4\u00e4n .htpasswd tiedosto  k\u00e4ytt\u00e4j\u00e4n kansioon ja asetetaan k\u00e4ytt\u00e4j\u00e4ksi service ja salasanaksi juhamatti -><\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"765\" height=\"33\" data-id=\"676\"  src=\"http:\/\/tietokanta.dy.fi\/linux\/wp-content\/uploads\/2022\/02\/htpassu.jpg\" alt=\"\" class=\"wp-image-676\"\/><\/figure>\n<\/figure>\n\n\n\n<p>Toinen vaihtoehto on tehd\u00e4 .htpasswd tiedosto on k\u00e4ytt\u00e4\u00e4 online htpasswd <a rel=\"noreferrer noopener\" href=\"https:\/\/wtools.io\/generate-htpasswd-online\" target=\"_blank\">generaattoria<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>.htpasswd tiedoston voi tehd\u00e4 terminaalissa k\u00e4ytt\u00e4en komentoa htpasswd. Alla valinnat ja k\u00e4ytt\u00f6:Usage:htpasswd [-cimBdpsDv] [-C cost] passwordfile usernamehtpasswd -b[cmBdpsDv] [-C cost] passwordfile username password -c Create a new file.-n Don&#8217;t update file; display results on stdout.-b Use the password from the command line rather than prompting for it.-i Read password from stdin without verification (for script &hellip; <a href=\"http:\/\/tietokanta.dy.fi\/linux\/index.php\/2020\/04\/13\/htpasswd-tiedoston-tekeminen\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">htpasswd tiedoston tekeminen<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/275"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":6,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":677,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/275\/revisions\/677"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}