exercitobr
(usa Debian)
Enviado em 03/04/2008 - 21:01h
Instale o chpasswdÇ
PRE-REQUISITOS
* GCC
* APACHE (HTTPD)
OS PRE-REQUISITOS PODEM SER INSTALADOS UTILIZANDO-SE O COMANDO APT-GET
servidor:~ # apt-get install gcc
servidor:~ # apt-get install httpd
BAIXANDO O PACOTE CHPASSWD (http://sourceforge.net/)
servidor:~ # wget
http://ufpr.dl.sourceforge.net/sourceforge/orsochpasswd/chpasswd-2.2.3.tar.gz
DESCOMPACTANDO O PACOTE
servidor:~ # tar xvfz chpasswd-2.2.3.tar.gz
servidor:~ # cd chpasswd-2.2.3
DEFINA O CAMINHO DA INSTALACAO EM PREFIX
servidor:~/chpasswd-2.2.3 # ./configure
--prefix=/etc/squid/apps/chpasswd --enable-language=Portuguese
\--enable-cgidir=/srv/www/cgi-bin
CRIE O DIRETORIO "apps"
servidor:~/chpasswd-2.2.3 # mkdir /etc/squid/apps
COMPILANDO O PACOTE
servidor:~/chpasswd-2.2.3 # make
SE VOCÊ TIVER OS ERROS ABAIXO
chpasswd.c:287: error: static declaration of âhtoiâ follows non-static
declaration
chpasswd.c:269: error: previous implicit declaration of âhtoiâ was here
make: *** [chpasswd.o] Error 1
BAIXE O PATCH PARA CORRIGILOS E APLIQUE COM OS COMANDOS
servidor:~/chpasswd-2.2.3 # wget
http://sarg.sourceforge.net/htoi.patch
servidor:~/chpasswd-2.2.3 # patch -p0 < htoi.patch
e reconfigure
servidor:~/chpasswd-2.2.3 # ./configure
--prefix=/etc/squid/apps/chpasswd --enable-language=Portuguese
\--enable-cgidir=/srv/www/cgi-bin
servidor:~/chpasswd-2.2.3 # make install
CONFIGURANDO O CHPASSWD
servidor:~/chpasswd-2.2.3 # cd /etc/squid/apps/chpasswd
[root em servidor chpasswd]# vi chpasswd.conf
DEFINA O CAMINHO DO ARQUIVO DE SENHAS
password_file /etc/squid/passwd
DEFINA O TITULO DA PAGINA DE TROCA DE SENHA
header "Alterar senha da acesso a internet"
enable_log /etc/squid/apps/chpasswd/chpasswd.log
ALTERANDO A SENHA DO SQUID
UTILIZE UM NAVEGADOR DA INTERNET
http://servidor/cgi-bin/chpasswd.cgi
REMOVA A PASTA DESCOMPACTADA
servidor:~/chpasswd-2.2.3 # cd ..
servidor:~ # rm -rf chpasswd-2.2.3