Webserver such as Nginx / Lighttpd accepets passwords using encoded
method i.e. function crypt(3) is needs. You can create the password file
with the htpasswd program from Apache. Sometime Apache is not installed
use the following perl script to create password.
Set permissions:
Sample Output:
How do I use crypt.pl?
Download scriptSet permissions:
chmod +x crypt.pl
./crypt.pl mySecrete
Sample Output:
$1$mySecret$TQgDKW6xpDmEUyxm5ZDxv/Now you can create htpasswd file for lighttpd or nginx:
user:$1$mySecret$TQgDKW6xpDmEUyxm5ZDxv/
Perl script to replace htpasswd
#!/usr/bin/perl use strict; my $passWord=$ARGV[0];
0 comments:
Post a Comment