Trích:
Nguyên văn bởi sec-it
+ Download change_pass plugin
http://www.squirrelmail.org/countdl....a-1.4.x.tar.gz
+ Đem gói change_pass vào thư mục plugin squirrelmail rồi : tar –zxvf change_pass*.tar.gz
+ Download poppassd and compile the source code
http://www.netwinsite.com/poppassd/
+ gcc poppassd.c -o poppassd -lcrypt
+ cp poppassd /usr/sbin
+ [root@localhost xinetd.d]# cat /etc/xinetd.d/poppassd
service poppassd
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/poppassd
log_on_success += USERID
log_on_failure += USERID
}
+ telnet localhost 106
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Poppasswd đã cài thành công
Kế đến vào config của squirrelmail rồi add change_pass vào và test thử
|
copy & past vay cung khong xong............
Step 1. Double Checking The Source
The popassd.c has been provided for you to double check that no hacking code has been added to breach your security. I suggest that you take a good look at the code and try to understand what it is doing.
On some machines you may need to make some slight changes to make poppassd work on your system.
Step 2. Building and Copying Poppassd
The next step is to compile the poppassd.c, the following command should work on most unix systems.
gcc poppassd.c -o poppassd
or
cc poppassd.c -o poppassd
If you receive the following Error:
poppassd.c: In function `chkPass':
poppassd.c:811: warning: passing arg 1 of `strcmp' makes pointer
from integer wi thout a cast /tmp/cca050571.o:
In function 'chkPass': /tmp/cca050571.o(.text+0xeba):
undefined reference to `crypt'
Then you will need to compile using the following line:
gcc poppassd.c -o poppassd -lcrypt
For some AIX systems you might have to compile using the following:
gcc poppassd.c -I /usr/local/src/bison-1.22 -o poppassd
Now you have to copy the executable into the following directory:
/usr/local/bin
Note that the owner and group should always be root. To ensure other users cannot change system passwords.
Step 3. Informing System of Poppassd
CWMail/DMailWeb is expecting poppassd to be setup on port 106, using TCP protocol. This is done by editing '/etc/services' and adding the follow line:
poppassd 106/tcp
The file '/etc/inetd.conf' will need to be updated to accept poppassd. The following line will need to be added.
poppassd stream tcp nowait root /usr/local/bin/poppassd poppassd
You will then need to do a:
Kill -HUP inetd
to the inetd process. This restarts inetd so activating the poppassd service.
Step 4. Double Checking that the poppassd is working.
To check to see if the poppassd is working you will need to open a telnet session and connect to the machine that has the poppassd, on port 106.
If you get the following prompt then poppassd is correctly working.
200 machine_name popassd v1.4 hello, who are you?
.................................................. ...............................................
cac bac cu' lam theo la ok
change_pass da`nh cho version: SquirrelMail version 1.4.8-5.el5.centos.10