ログインしてさらにmixiを楽しもう

コメントを投稿して情報交換!
更新通知を受け取って、最新情報をゲット!

QPopper 友の会コミュのpoppassdについて

  • mixiチェック
  • このエントリーをはてなブックマークに追加
はじままして。

qpopperの中のpoppassdについて質問があります。

以下の手順でインストールして

./configure --enable-poppassd --enable-apop=/etc/mail/pop.auth --enable-specialauth
make
make install

/etc/xinetd.d/poppassdに

service poppassd
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/local/bin/poppassd
log_on_success += USERID
log_on_failure += USERID
}

と設定させxinetdを再起動してもEudoraからパスワード変更が出来ません。
/etc/servicesは、以下の様になっております。

poppassd 106/tcp # Eudora
poppassd 106/udp # Eudora

/var/log/messagesには以下の様なログが出力されます。

Jul 12 10:00:40 hoge poppassd[2853]: can't find pty

ptyが何か調べたのですが、仮想端末という事しか解りませんでした。
どうすれば、使用出来るようになるのでしょうか。

環境は以下の通りです。

OS:RedHatLinux9

宜しくお願い致します。

コメント(10)

./configureの結果は

checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for library containing strerror... none required
checking for bison... bison -y
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for ar... ar
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for gperf... no
checking for cperf... no
./configure: line 2886: WARNING:: command not found
checking for gcc version 2.7.2.3... no
checking if gcc supports __attribute__ (format) ... yes
checking if ar chokes on -r... no
checking for getspnam... yes
Found getspnam(); using shadow passwords by default
Will NOT compile in debugging code
Defining SPEC_POP_AUTH
APOP is enabled.
Generating password/poppassd password-change daemon
System name: Linux; System version: 2.6.11-1.35_FC3
Set OS_DEFS = " -DLINUX -DUNIX"
Logging to facility: LOG_MAIL
Set AR_FLAG = " -r "; RANLIB_CMD = ""
checking for sendmail program... found at /usr/sbin/sendmail
checking for mail spool directory... "found at /var/mail"
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether sys_siglist is declared... no
checking prot.h usability... no
checking prot.h presence... no
checking for prot.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for strings.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/security.h usability... no
checking sys/security.h presence... no
checking for sys/security.h... no
checking sys/syslog.h usability... yes
checking sys/syslog.h presence... yes
checking for sys/syslog.h... yes
checking for sys/types.h... (cached) yes
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking sys/unistd.h usability... yes
checking sys/unistd.h presence... yes
checking for sys/unistd.h... yes
checking sys/netinet/in.h usability... no
checking sys/netinet/in.h presence... no
checking for sys/netinet/in.h... no
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking net/errno.h usability... no
checking net/errno.h presence... no
checking for net/errno.h... no
checking for unistd.h... (cached) yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking maillock.h usability... no
checking maillock.h presence... no
checking for maillock.h... no
checking select.h usability... no
checking select.h presence... no
checking for select.h... no
checking shadow.h usability... yes
checking shadow.h presence... yes
checking for shadow.h... yes
checking security/pam_appl.h usability... yes
checking security/pam_appl.h presence... yes
checking for security/pam_appl.h... yes
checking pam/pam_appl.h usability... no
checking pam/pam_appl.h presence... no
checking for pam/pam_appl.h... no
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking ndbm.h usability... no
checking ndbm.h presence... no
checking for ndbm.h... no
checking gdbm.h usability... yes
checking gdbm.h presence... yes
checking for gdbm.h... yes
checking dbm.h usability... no
checking dbm.h presence... no
checking for dbm.h... no
checking for t_accept in -lnsl... no
checking for socket in -lsocket... no
checking for res_init in -lresolv... no
checking for maillock in -lmail... no
checking for krb_recvauth in -lkrb... no
checking for clock_gettime in -lposix4... no
checking for crypt in -lcrypt... yes
checking for set_auth_parameters in -lsecurity... no
checking for dlopen in -ldl... yes
checking for pam_authenticate in -lpam... yes
checking which database manager to use ... checking gdbm ... checking for gdbm_open in -lgdbm... yes
found gdbm
checking for an ANSI C-conforming const... yes
checking for uid_t in sys/types.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking whether sys_siglist is declared... (cached) no
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working memcmp... yes
checking return type of signal handlers... void
checking whether utime accepts a null argument... yes
checking for vprintf... yes
checking for _doprnt... no
checking for wait3 that fills in rusage... yes
checking for gethostname... yes
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for getusershell... yes
checking for mkdir... yes
checking for socket... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for bcopy... yes
checking for index... yes
checking for flock... yes
checking for set_auth_parameters... no
checking for pw_encrypt... no
checking for hstrerror... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for srandom... yes
checking for srand... yes
checking for usleep... yes
checking for crypt... yes
checking for crypt16... no
checking for bigcrypt... no
checking for setproctitle... no
checking for mkstemp... yes
checking for setresuid... yes
checking for library containing gethostbyname... none required
checking for unsigned long int... yes
checking size of unsigned long int... 4
checking for /dev/urandom ... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating common/Makefile
config.status: creating popper/Makefile
config.status: creating mmangle/Makefile
config.status: creating password/Makefile
config.status: creating config.h

ですが、一箇所

./configure: line 2886: WARNING:: command not found

と出力されておりました。

configureの2886行目を見てみると

test -n "$GPERF" || GPERF="{ echo "$as_me:$LINENO: WARNING: \"Unable to find gperf/cperf\"" >&5

と記述されておりましたが、さっぱり解りません。

./configureの結果はerrorはありませんでしたが、これが
原因なのでしょうか?
passwdコマンドを実行した際に返ってくるMessageが違うため、正常に認識出来ない・・・というパターンじゃないですかね。
よくSolarisで引っ掛かります。

LOCALEをCにして手動でpasswdを叩いた時のMessageと、Source中の「期待される返答」部分を比較してみてください。
4.0.8のpoppassd.cだと288行目からの構造体の中。
簡単なマッチングしかしてないみたいなので、適当な行をDupって書き換えるだけでOKです。

>ptyが何か調べたのですが

poppassd.cを見れば一発で判ると思います。
LANG=Cにして

passwdを実行した結果は、以下の通りでした。
[aa@hoge ~]$ passwd
Changing password for user aa.
Changing password for aa
(current) UNIX password:

でしたので、poppassd.cを以下の様に書き換えて、./configureしたのですが、
同じ結果(can't find pty)でした。

/* Prompt strings expected from the "passwd" command. If you want
* to port this program to yet another flavor of UNIX, you may need to add
* more prompt strings here.
*
* Each prompt is defined as an array of pointers to alternate
* strings, terminated by an empty string. In the strings, '*'
* matches any sequence of 0 or more characters. Pattern matching
* is forced to lower case so enter only lower case letters.
*/

static char *P1[] =
{
"changing password for *\nold password: ", /* shadow */
"enter login password: ", /* Solaris */
"old smb password: ", /* smb */
""
};

static char *P2[] =
{
"new password:", /* needed to get error msgs */
"new password: ", /* DEC True 64 */
"*\n*\nnew password: ", /* shadow */
"new password: ",
"new smb password: ", /* smb */
""
};

static char *P3[] =
{
"re-enter new password:*", /* shadow */
"re-enter new password: ",
"retype new password: ", /* DEC True 64 */
"retype new smb password: ", /* smb */
""
};

static char *P4[] =
{
"password changed. ", /* shadow */
"password changed ", /* smb */
""
};

>poppassd.cを見れば一発で判ると思います。

有難う御座います。
>以下の様に書き換えて

コマンドラインのmessageと同じになってますか?
私には違って見えるのですが・・・
改行付きmessageの場合は「?n」でエスケープして突っ込んでやる必要があるし、スペース(0x20)も「そのまま」入れる必要があります。

で、P1〜P4は順繰りにチェックされますので、必要に応じて全部書き換え(追加)なきゃいけません。
あ、バックスラッシュが化けた。「\n」です。
Madさん、返事が遅くなって申し訳ありませんでした。

前回変更したのをコピーして貼り付けたと思っていたのですが、
デフォルトのままになっていました。
実際には以下の通りにしております。

static char *P1[] =
{
"changing password for *\nold password: ", /* shadow */
"enter login password: ", /* Solaris */
"old smb password: ", /* smb */
"(current) UNIX password: ", /* RedHat9 */
""
};

static char *P2[] =
{
"new password:", /* needed to get error msgs */
"new password: ", /* DEC True 64 */
"*\n*\nnew password: ", /* shadow */
"new password: ",
"new smb password: ", /* smb */
"New UNIX password: ", /* RedHat9 */
""
};

static char *P3[] =
{
"re-enter new password:*", /* shadow */
"re-enter new password: ",
"retype new password: ", /* DEC True 64 */
"retype new smb password: ", /* smb */
"Retype new UNIX password: ", /* RedHat9 */
""
};

"New UNIX password: ", /* RedHat9 */
""
};

static char *P3[] =
{
"re-enter new password:*", /* shadow */
"re-enter new password: ",
"retype new password: ", /* DEC True 64 */
"retype new smb password: ", /* smb */
"Retype new UNIX password: ", /* RedHat9 */
""
};

static char *P4[] =
{
"password changed. ", /* shadow */
"password changed ", /* smb */
"passwd: all authentication tokens updated successfully. ", /* RedHat9 */
""
};
とりあえずは、trace掛けてどこで落ちているか調べるのが一番早いかも。
もしくは、別のProgramのSourceと比較する。
Madさん、すみません。

コピー&ペーストもちゃんと出来てませんでした。

passwdコマンドの実行結果は以下の通りです。

[aa@hoge ~]$ passwd
Changing password for user aa.
Changing password for aa
(current) UNIX password: *****
New UNIX password: *****
Retype new UNIX password: *****
passwd: all authentication tokens updated successfully.


上記から、password/poppassd.cは以下の様になるかと思います。

static char *P1[] =
{
"changing password for *\nold password: ", /* shadow */
"enter login password: ", /* Solaris */
"old smb password: ", /* smb */
"Changing password for *\nChanging password for *\n(current) UNIX password: ", /* RedHat9 */
""
};

static char *P2[] =
{
"new password:", /* needed to get error msgs */
"new password: ", /* DEC True 64 */
"*\n*\nnew password: ", /* shadow */
"new password: ",
"new smb password: ", /* smb */
"New UNIX password: ", /* RedHat9 */
""
};

static char *P3[] =
{
"re-enter new password:*", /* shadow */
"re-enter new password: ",
"retype new password: ", /* DEC True 64 */
"retype new smb password: ", /* smb */
"Retype new UNIX password: ", /* RedHat9 */
""
};

static char *P4[] =
{
"password changed. ", /* shadow */
"password changed ", /* smb */
"passwd: all authentication tokens updated successfully. ", /* RedHat9 */
""
};

> とりあえずは、trace掛けてどこで落ちているか調べるのが一番早いかも。
> もしくは、別のProgramのSourceと比較する。

traceとはどの様にすれば宜しいのでしょうか。

今後、初歩的なミス(コピー&ペースト)が無いように致します。
また、体調不良が続いており返事が遅くなってしまうかも知れませんが、
宜しくお願い致します。
>traceとはどの様にすれば

man -k trace
もしくは、デバッガ経由での実行。

申し訳有りませんが、RedHatは触った事が殆ど無いのでわかりません。
以下のURLからrpmパッケージをDLしてインストールすると
うまく、パスワードの変更ができました。

http://www.samera.net/rpm/

でも、qpopper4.0.xのpoppassdにはローカルからroot権限
(uid 0)の奪取が出来ると言う事を聞いたのですが、最新の
バージョンでは解決されているのでしょうか。

私の力不足なのでしょうが、ソースからインストール出来
れば、qpopperも利用出来るのですが・・・。
※今現在は、ipop3を利用しております。

ログインすると、みんなのコメントがもっと見れるよ

mixiユーザー
ログインしてコメントしよう!

QPopper 友の会 更新情報

QPopper 友の会のメンバーはこんなコミュニティにも参加しています

星印の数は、共通して参加しているメンバーが多いほど増えます。

人気コミュニティランキング