shadow password

Posted by LinuxGeek on Stack Overflow See other posts from Stack Overflow or by LinuxGeek
Published on 2010-03-18T13:56:56Z Indexed on 2010/03/18 14:01 UTC
Read the original article Hit count: 345

Filed under:
|
|

I'm trying to compare shadow password with php cli but not work ! i use this function so i can create password like shadow

function shadow ($input){
         for ($n = 0; $n < 9; $n++){
              $s .= chr(rand(64,126));
         }
         $seed =  "$1$".$s."$";
         $return = crypt($input,$seed);
    return $return;
}

when i replace the result in shadow it's work with the password but it's have different character how i can compare it .

thanks

© Stack Overflow or respective owner

Related posts about linux

Related posts about auth