htpasswd
all
Create and manage htpasswd files to protect web server directories using basic authentication.
More info →Examples (6)
Create/overwrite htpasswd file
htpasswd -c path/to/file usernameAdd user to htpasswd file or update existing user
htpasswd path/to/file usernameAdd user to htpasswd file in batch mode without an interactive password prompt (for script usage)
htpasswd -b path/to/file username passwordDelete user from htpasswd file
htpasswd -D path/to/file usernameVerify user password
htpasswd -v path/to/file usernameDisplay a string with username (plain text) and password (md5)
htpasswd -nbm username passwordmade by @shridhargupta | data from tldr-pages