Hello:

samit  pal wrote,
> I want to use php to encrypt passwords the same way that linux does.

Passwords under most Unixes are not encrypted, they are "hashed" using
some scheme.

> Can I do that?  Actually I have to do browser based authentication.
> For that i have to take username and password and encrypt the password
> the same way that linux does and then check it through a system call.
> How do i encrypt the password?  Please help 

See the PHP crypt function:
http://www.php.net/manual/en/function.crypt.php

The Linux hashing scheme (taken from BSD IIRC) uses a MD5 algo with a 8
char random salt prefixed by "$1$".

-- Shanu

-- 
Grinnell's Law of Labor Laxity:
        At all times, for any task, you have not got enough done today.

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to