Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP & smbpasswd

Status
Not open for further replies.

cmancre

Programmer
Jan 30, 2005
35
PT
Hi, im doing some project at my work and i need a little help. So a got windows server with apache and the smbpasswd file (this one comes from a linux machine, doesn't mather how) OK! My question is how can i encrypt some words to compare to the ones in the file. Thanks for the time ...C
 
smbpasswd file should use md5('password') algorithm afaik, info's here

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I don't think smbpasswd uses md5(). At least on my system, the value the smbpasswd function adds to the smbpasswd file doesn't match the output of PHP's md5() function.

There is an open-source program called smbencrypt which is in the archive of user-contributed software at the Samba FTP site. It is available as a source tarball at ftp://ftp.samba.org/pub/samba/contributed/smbencrypt-0.1.tar.gz . (Pay attention to the README file for potential problems with library dependencies).

That application, once compiled, will allow you to hash a string the same way that smbpasswd does. You'll have to run the program as an external executable.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top