Perl kai passwords(SOLVED)!

Topoglidis Con/nos ktop at gtpnet.com
Fri Aug 31 11:39:00 EEST 2001


kalimera,

telika me tin boithima tou Sotiri Tsimponi ....brethike lisi ....
to provlima itan oti i useradd -p salt_of_pass username
eperne to MD5 password kai to ebaze (sosta) stin thesi tis petablitis ....
to problima arxize ... epeidi to shell eperne tin arxi tou MD5 password (pou
itane $1$....ktl) san metabliti
opote kai "ekobe" to password !!!!

i lisi dothike me tis \ :)

gia na kaneis MD5 se perl perneis to module Crypt::PasswdMD5 (apo tin CPAN
tis geitonias sou!) :)

use Crytp::PasswdMD5;
$crypto_pass = unix_md5_crypt($pass_for_encryption,$salt);
$crypto_pass = ~s/\$/\\\$/g;
(gia na doulepsei me to shell)

(kai meta i useradd)
system("useradd -p $crypto_pass $username");
kai douleuei apsoga me to systima :))

gia DES encryption se perl apla :

$crypto_pass = crytp $pass_for_encryption,$salt;

kai ola douleuou apsoga :)
thnx autous pou asxolithikan :)

kai eidika ton Sotiri :)


--

Topoglidis Con/nos
(Trying only ... to learn!)





More information about the Linux-greek-users mailing list