[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Setting a users password without being logged in
macky@staktrading.com writes:
[...]
>
> I just need to know how to encrypt the new password before writing it.
>
[perl interpolate=1]
# initialize random generator
srand ($$ ^ time);
# valid salt characters
@saltchars = ('a'..'z','A'..'Z',0..9,'.','/');
# random salt characters
$salt = $saltchars[int(rand($#saltchars+1))]
. $saltchars[int(rand($#saltchars+1))];
# encrypted password
crypt ([scratch passwd], $salt);
[/perl]
Add "crypt", "srand", "rand" and "time" to SafeUntrap in minivend.cfg.
Ciao
Racke
--
LinuXia - Solutions of Cool Competence - Internetprogramming and more
D-30163 Hannover, Waldstraße 4, 0511-3941290 (http://www.linuxia.net/)
Wir realisieren Onlineshops mit Minivend (http://www.minivend.com)
und MiniMate (http://www.linuxia.net/minimate/).