[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
RE: [LI] .htaccess problems.
In Perl, here's how you generate a random salt for crypt:
$salt = join ( '' , ( '.' , '/' , 0..9 , 'A'..'Z' ,
'a'..'z' ) [rand 64 , rand 64] ) ;
If you want to create your own encrypted password, if the plaintext is
in $plaintext, in Perl:
$cryptedPassword = crypt ( $plaintext , $salt ) ;
HTH,
-- Raju
>>>>> "Sai" == V S Sai Satish <saisat@xxxxxxxxxxxx> writes:
Sai> The encrypted passwd need not start with any particular seed.
Sai> You have to run the 'htpasswd` command with appropriate
Sai> options, to encrypt the password for that user for the first
Sai> time. After this, when the user is prompted for userID &
Sai> Passwd on the page, the password should be entered . This
Sai> passwd is checked with already encrypted one and authorised
Sai> accrdgly.
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.