VnLamp

Go Back   VnLamp > Khu vực Training > LPI

Trả lời
 
LinkBack Ðiều Chỉnh Xếp Bài
Change password user trong squirrelmai ( postfix + dovecot ) dùng PAM
Old
  (#1 (permalink))
 
Status: Offline
Posts: 28
Tham gia: Jan 2008
BQT VNLAMP
Default Change password user trong squirrelmai ( postfix + dovecot ) dùng PAM - 06-09-2008, 09:6 06-09-2008

+ 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ử
   
Trả Lời Với Trích Dẫn
Chao bạn
Old
  (#2 (permalink))
 
Status: Offline
Posts: 16
Tham gia: Jun 2009
Junior Member
Default Chao bạn - 04-02-2010, 10:4 04-02-2010

Trích:
Nguyên văn bởi sec-it View Post
+ 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ử
Bạn có thể nói cụ thể hơn một chút dc ko? mình cung telnet localhost ra nhu bạn rồi nhưng khi vào option thì chằng thấy có gì cả, mình đã add change_pass roi

thanks ban
   
Trả Lời Với Trích Dẫn
Old
  (#3 (permalink))
 
Status: Offline
Posts: 22
Tham gia: Sep 2008
Học viên VNLAMP
 
hailua_khokhao's Avatar
Thumbs up 06-02-2010, 17:6 06-02-2010

Trích:
Nguyên văn bởi sec-it View Post
+ 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


:eek::eek:hailua_khokhao:confused::confused:

thay đổi nội dung bởi: hailua_khokhao, 06-02-2010 lúc 17:6 06-02-2010.
  Send a message via Yahoo to hailua_khokhao  
Trả Lời Với Trích Dẫn
Old
  (#4 (permalink))
 
Status: Offline
Posts: 450
Tham gia: Dec 2007
BQT VNLAMP
 
goldenbook's Avatar
Default 07-02-2010, 23:7 07-02-2010

cách nào cũng về la mã cả.
có 2 cách
+ C1 : sử dụng cách của Seth Randall
+ C2 : sử dụng cách của Thiago Melo de Paula

Vào phần Plugins của trang SquirrelMail - Webmail for Nuts! là thấy liền.

Giờ chọn cách nào là tùy vào gu của admin.
Vào phần Details and downloads, xem kỷ các version mình cần và nhất là chú ý download đúng Compatibility plugin
Sau khi download về giải nén, đọc file hướng dẫn và làm y theo là ra thôi.

Tôi có góp ý : cách trên là bạn "sec-it" viết theo kiểu của "Seth Randall" nếu có gì chưa hoàn thành thì mình update vào đừng quá chê "copy & past vay cung khong xong............" vì đôi khi công việc làm nhiều quá, cứ nghĩ thấy hay hay up anh em cùng xem, chứ không phải chuyện làm chạy hay không chạy. Bài viết là lý thuyết còn thực hành còn tùy thuộc và nhiều khía cạnh. "biển học và vô bờ."


Nhĩ Vương Nhãn Tâm Thất
   
Trả Lời Với Trích Dẫn
Trả lời


Ðiều Chỉnh
Xếp Bài

Quyền Sử Dụng Ở Diễn Ðàn
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 Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt
Trackbacks are Mở
Pingbacks are Mở
Refbacks are Mở


Múi giờ GMT. Hiện tại là 22:12 12-03-2010.