LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 12-02-2008, 03:11 AM   #1
sonykarthik71
LQ Newbie
 
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
squid proxy authentication htpasswd command problem


Hi,

I have installed squid in my vmware and its started and it is working in client side also with the proxy settings.But after that i try to set proxy NCSA authentication by using htpasswd command,its throughing out the error

bash:htpasswd command not found

what is the cause of this problem?How can i set the authentication now?

Regards,
Karthik
 
Old 12-02-2008, 04:44 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
htpassword is found in the httpd package if using centos/redhat and apache2-utils on debian
 
Old 12-02-2008, 06:25 AM   #3
netkiller
LQ Newbie
 
Registered: Dec 2003
Posts: 7

Rep: Reputation: 0
actually, that passwd is crypt passwd.
has a lot of way to generate passwd.

you can see my document if you known chinese LOL.
http://netkiller.hikz.com/book/security/


the following is c language

[root@linux root]# cat crypt.c
/*
Netkiller 2003-06-27 crypt.c
char *crypt(const char *key, const char *salt);
*/
#include <unistd.h>
main(){
char key[256];
char salt[64];
char passwd[256];
printf("key:");
scanf("%s",&key);
printf("salt:");
scanf("%s",&salt);
sprintf(passwd,"passwd:%s\n",crypt(key,salt));
printf(passwd);
}
[root@linux root]# gcc -o crypt -s crypt.c –lcrypt
[root@linux root]# ./crypt
key:chen
salt:salt
passwd:sa0hRW/W3DLvQ
[root@linux root]#








# cat crypt.php

<html>

<p>DES 密码</p>

<form method=post action=crypt.php>

<p>password:<input name=passwd type=text size=20></p>

<input type=submit value=submit>

</form>

<?

$enpw=crypt($passwd);

echo "password is: $enpw";

?>









perl -e 'print("userPassword: ".crypt("secret","salt")."\n");'








mysql crypt

select encrypt('password');



mysql> select encrypt('password');

+---------------------+

| encrypt('password') |

+---------------------+

| WXvvG0CWY7v5I |

+---------------------+

1 row in set (0.00 sec)



mysql>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seamless proxy authentication using Squid antomac Linux - Server 1 10-24-2007 07:31 AM
Squid proxy authentication inaki Linux - General 0 08-13-2007 03:39 AM
squid proxy authentication satish Linux - Networking 1 01-10-2006 09:36 AM
Squid proxy authentication gubak Linux - Networking 2 11-16-2005 04:34 AM
squid proxy authentication aqoliveira Linux - General 1 02-02-2002 03:01 PM


All times are GMT -5. The time now is 12:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration