mirror of
https://github.com/house-of-vanity/house-of-vanity.github.io.git
synced 2025-07-07 08:44:07 +00:00
Fix webview
This commit is contained in:
19
content/blog/htpasswd.md
Normal file
19
content/blog/htpasswd.md
Normal file
@ -0,0 +1,19 @@
|
||||
+++
|
||||
title = ".htpasswd one-liner"
|
||||
date = "2020-07-13"
|
||||
description = "creating password hash for Basic auth"
|
||||
|
||||
[taxonomies]
|
||||
tags = ["linux", "tools", "selfhosting"]
|
||||
|
||||
[extra]
|
||||
author = { name = "@ultradesu", social= "https://github.com/house-of-vanity" }
|
||||
+++
|
||||
|
||||
It's annoying when you need apache2-utils just for creating password hash for Basic auth. So here is Shell one-liner doing it using openssl.
|
||||
```sh
|
||||
user=ab
|
||||
pass=pwd
|
||||
printf "${user}:$(openssl passwd -apr1 ${pass})\n"
|
||||
```
|
||||
---
|
Reference in New Issue
Block a user