How To Create Apache htpasswd file

This just simply outputs what you need a username and password that can be used to authenticate from .htaccess

htpasswd -nb user password
user:Gnb6uE9Lp4gt2
 

If you want to write it straight to a file

htpasswd -cb /tmp/somefile.pw user password

How To Use This In .htaccess

AuthUserFile /tmp/somefile.pw
AuthName GetLost!!
AuthType Basic

#make sure you require a user!

require valid-user 

Tags:

apache, htpasswd, filethis, outputs, username, password, authenticate, htaccess, nb, user, gnb, ue, lp, cb, tmp, somefile, pw, authuserfile, authname, getlost, authtype, valid,

Latest Articles

  • Linux Mint 18.2 Create Config File To Start Application Upon Login
  • Dell Wyse Thin Client BIOS Access Key
  • sudoers fle in /etc warning about comments/includes!
  • Centos 7 Reallocate logical volume space to another
  • lvm how to reduce volume size
  • letsencrypt certbot error "Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80."
  • SSH error cannot Forward or Listen "bind: Cannot assign requested address"
  • X11 SSH Linux Forwarding Error
  • Using Microsoft's Group Policy Management Editor (GPME) To Change Default Permissions and Internet Explorer Security Settings
  • Thunderbird How To Disable An Email Account
  • iptables linux firewall recommended rules for public computing
  • LVM How To Create Pool (dynamically allocated and not fully allocated)
  • VMWare Pro Workstation Nic Disconnected and No IP Using NAT
  • Linux How To Create A RamDisk
  • mdadm force resync when resync=PENDING solution
  • Proxmox Breaks Storage/LVM Backing If Killing QEMU-IMG
  • Proxmox trying to acquire lock... TASK ERROR: can't lock file '/var/lock/qemu-server/lock-102.conf' - got timeout
  • Debian 9 SSH root password authentication failure password not working problem / solution
  • QEMU / KVM How To Manually Create Basic Virtual Machine VM
  • Linux wlan0 check all wireless clients