2017 © Pedro Peláez
 

library htpasswd-cli

Htpasswd CLI utility

image

axy/htpasswd-cli

Htpasswd CLI utility

  • Sunday, April 3, 2016
  • by axy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 282 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

axy\htpasswd-cli

Documentation in Russian., (*1)

PHP 5.4+, (*2)

Library does not require any dependencies (except composer packages)., (*3)

Provides console utility axy-htpasswd that is analogue of Apache htpasswd utility., (*4)

Install (via composer):, (*5)

$ composer global require axy/htpasswd-cli

The utility is stored in the directory .composer/vendor/bin. If this directory has been added to $PATH you can use the utility from the command line:, (*6)

$ axy-htpasswd -cb .password-file nick password

You can rename axy-htpasswd to htpasswd and use as usual., (*7)

Algorithms

axy-password supports all crypt algorithms of Apache 2.4 htpasswd:, (*8)

  • BCrypt
  • MD5 (Apache version)
  • SHA1
  • CRYPT
  • PLAIN TEXT

Interface

axy-password matches the interface of htpasswd:, (*9)

Usage:
    axy-htpasswd [-cimBdpsDv] [-C cost] passwordfile username
    axy-htpasswd -b[cmBdpsDv] [-C cost] passwordfile username password

    axy-htpasswd -n[imBdps] [-C cost] username
    axy-htpasswd -nb[mBdps] [-C cost] username password
 -c  Create a new file. (no effect in the current version)
 -n  Don'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 usage).
 -m  Force MD5 encryption of the password (default).
 -B  Force bcrypt encryption of the password (very secure).
 -C  Set the computing time used for the bcrypt algorithm
     (higher is more secure but slower, default: 5, valid: 4 to 31).
 -d  Force CRYPT encryption of the password (8 chars max, insecure).
 -s  Force SHA encryption of the password (insecure).
 -p  Do not encrypt the password (plaintext, insecure).
 -D  Delete the specified user.
 -v  Verify password for the specified user.
On other systems than Windows and NetWare the '-p' flag will probably not work.
The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.

Differs:, (*10)

  • The option -c has no effect. If the file exists then it will be changed. If not exist then will be created.
  • Many errors of options combination are ignored.
  • The option -n can be used together with -D and -v. It is analogue of an empty file, the user will not found.

Program API

For program API (PHP) see axypro/htpasswd., (*11)

The Versions

03/04 2016

dev-master

9999999-dev https://github.com/axypro/htpasswd-cli

Htpasswd CLI utility

  Sources   Download

MIT

The Requires

 

htpasswd

03/12 2015

0.1.1

0.1.1.0 https://github.com/axypro/htpasswd-cli

Htpasswd CLI utility

  Sources   Download

MIT

The Requires

 

htpasswd

03/12 2015

0.1.0

0.1.0.0 https://github.com/axypro/htpasswd-cli

Htpasswd CLI utility

  Sources   Download

MIT

The Requires

 

htpasswd