| leaper 回复于:2004-05-03 09:42:38 |
| 好东西,先收起来 |
| zqqa 回复于:2004-05-19 09:26:21 |
| 大哥,我照你方法配完了。可进去的时候总是说用户密码不对阿 |
| alibab 回复于:2004-05-31 11:27:25 |
| 真的不错,不过我在想,是不是可以用Qmail的Vpopmail库中的用户信息作为FTP的用户来认证,或是修改一下也可,这样,有一套用户就可以管理WEB和MAIL了, |
| alibab 回复于:2004-07-03 19:02:38 |
| 大哥, 帮帮呀,出现以下错误, lmysqlclient 是怎陌回事,
[root@bail pam_mysql]# make mkdir -p ./dynamic gcc -shared -Xlinker -x -L/usr/lib/mysql -lz -o pam_mysql.so dynamic/pam_mysql.o -lmysqlclient -lcrypt /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status make: *** [pam_mysql.so] Error 1 |
| alibab 回复于:2004-07-03 19:03:45 |
| mysql_devel我已经装上了, 怎样才能去掉lmysqlclient错误呀 |
| alibab 回复于:2004-07-03 20:33:05 |
| cp /usr/local/mysql/lib/libmysqlclient.10.0 /usr/lib 上面 lmysqlclien的问题解决了,
在客户端连接时,总是提示口令不对. 找不到问题所在 |
| qdinfo 回复于:2005-03-01 17:10:08 |
| 好东东啊。可是按装到这一步出错了。
大家帮我看看。 我的MYSQL是用tar.gz包按装的。 qdinfo:~/pam_mysql# ls Changelog CREDITS Makefile Makefile.bsd pam_mysql.c Readme qdinfo:~/pam_mysql# make mkdir -p ./dynamic gcc -O2 -Dlinux -DLINUX_PAM -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -pedantic -fPIC -DPAM_DYNAMIC -c pam_mysql.c -o dynamic/pam_mysql.o pam_mysql.c:35:25: mysql/mysql.h: 没有那个文件或目录 pam_mysql.c:56:34: security/pam_modules.h: 没有那个文件或目录 pam_mysql.c:57:31: security/pam_misc.h: 没有那个文件或目录 pam_mysql.c:81: error: parse error before '*' token pam_mysql.c:81: warning: type defaults to `int' in declaration of `mysql_auth' pam_mysql.c:81: error: ISO C forbids data definition with no type or storage class pam_mysql.c:106: error: parse error before '*' token pam_mysql.c:109: warning: function declaration isn't a prototype pam_mysql.c:111: error: parse error before '*' token pam_mysql.c:113: warning: function declaration isn't a prototype pam_mysql.c:115: error: syntax error before "int" pam_mysql.c:115: error: parse error before '*' token pam_mysql.c:116: warning: function declaration isn't a prototype pam_mysql.c:117: error: syntax error before "int" pam_mysql.c:117: error: parse error before '*' token pam_mysql.c:118: warning: function declaration isn't a prototype pam_mysql.c:119: error: syntax error before "int" pam_mysql.c:119: error: parse error before '*' token pam_mysql.c:120: warning: function declaration isn't a prototype pam_mysql.c:121: error: syntax error before "int" pam_mysql.c:121: error: parse error before '*' token pam_mysql.c:122: warning: function declaration isn't a prototype pam_mysql.c:123: error: syntax error before "int" pam_mysql.c:123: error: parse error before '*' token pam_mysql.c:124: warning: function declaration isn't a prototype pam_mysql.c:125: error: syntax error before "int" pam_mysql.c:125: error: parse error before '*' token pam_mysql.c:126: warning: function declaration isn't a prototype pam_mysql.c:133: error: parse error before '*' token pam_mysql.c:133: warning: function declaration isn't a prototype pam_mysql.c:141: error: parse error before '*' token pam_mysql.c:141: warning: function declaration isn't a prototype pam_mysql.c:143: error: parse error before '*' token pam_mysql.c:144: warning: function declaration isn't a prototype pam_mysql.c:151: error: parse error before '*' token pam_mysql.c:151: warning: function declaration isn't a prototype pam_mysql.c: In function `breakArgs': pam_mysql.c:157: warning: traditional C rejects ISO C style function definitions pam_mysql.c: In function `parseArgs': pam_mysql.c:233: warning: traditional C rejects ISO C style function definitions pam_mysql.c: At top level: pam_mysql.c:391: error: parse error before '*' token pam_mysql.c:391: warning: function declaration isn't a prototype pam_mysql.c: In function `db_connect': pam_mysql.c:392: error: `PAM_AUTH_ERR' undeclared (first use in this function) pam_mysql.c:392: error: (Each undeclared identifier is reported only once pam_mysql.c:392: error: for each function it appears in.) pam_mysql.c:399: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c:401: warning: implicit declaration of function `mysql_init' pam_mysql.c:401: error: `auth_sql_server' undeclared (first use in this function) pam_mysql.c:402: warning: implicit declaration of function `mysql_real_connect' pam_mysql.c:404: warning: assignment makes pointer from integer without a cast pam_mysql.c:407: warning: implicit declaration of function `mysql_select_db' pam_mysql.c:411: warning: implicit declaration of function `mysql_error' pam_mysql.c:411: warning: format argument is not a pointer (arg 3) pam_mysql.c: In function `db_close': pam_mysql.c:420: warning: traditional C rejects ISO C style function definitions pam_mysql.c:424: warning: implicit declaration of function `mysql_close' pam_mysql.c: At top level: pam_mysql.c:428: error: parse error before '*' token pam_mysql.c:429: warning: function declaration isn't a prototype pam_mysql.c: In function `db_checkpasswd': pam_mysql.c:438: error: `MYSQL_RES' undeclared (first use in this function) pam_mysql.c:438: error: `result' undeclared (first use in this function) pam_mysql.c:439: error: `MYSQL_ROW' undeclared (first use in this function) pam_mysql.c:439: error: parse error before "row" pam_mysql.c:440: error: `PAM_AUTH_ERR' undeclared (first use in this function) pam_mysql.c:452: error: `user' undeclared (first use in this function) pam_mysql.c:456: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_mysql.c:462: warning: implicit declaration of function `mysql_escape_string' pam_mysql.c:509: warning: implicit declaration of function `mysql_query' pam_mysql.c:509: error: `auth_sql_server' undeclared (first use in this function) pam_mysql.c:513: warning: implicit declaration of function `mysql_store_result' pam_mysql.c:516: warning: function `mysql_error' was previously declared within a block pam_mysql.c:516: warning: format argument is not a pointer (arg 3) pam_mysql.c:517: warning: implicit declaration of function `mysql_free_result' pam_mysql.c:521: warning: implicit declaration of function `mysql_num_rows' pam_mysql.c:523: warning: function `mysql_free_result' was previously declared within a block pam_mysql.c:528: error: `row' undeclared (first use in this function) pam_mysql.c:528: warning: implicit declaration of function `mysql_fetch_row' pam_mysql.c:531: warning: function `mysql_error' was previously declared within a block pam_mysql.c:531: warning: format argument is not a pointer (arg 3) pam_mysql.c:536: error: `passwd' undeclared (first use in this function) pam_mysql.c:576: warning: implicit declaration of function `make_scrambled_password' pam_mysql.c:589: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c:603: warning: function `mysql_free_result' was previously declared within a block pam_mysql.c: At top level: pam_mysql.c:611: error: parse error before '*' token pam_mysql.c:613: warning: function declaration isn't a prototype pam_mysql.c: In function `converse': pam_mysql.c:617: warning: implicit declaration of function `pam_get_item' pam_mysql.c:617: error: `pamh' undeclared (first use in this function) pam_mysql.c:617: error: `PAM_CONV' undeclared (first use in this function) pam_mysql.c:617: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:619: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c:620: error: dereferencing pointer to incomplete type pam_mysql.c:620: error: `nargs' undeclared (first use in this function) pam_mysql.c:621: error: `message' undeclared (first use in this function) pam_mysql.c:622: error: `response' undeclared (first use in this function) pam_mysql.c:622: error: dereferencing pointer to incomplete type pam_mysql.c:623: error: `PAM_CONV_AGAIN' undeclared (first use in this function) pam_mysql.c:625: warning: implicit declaration of function `pam_strerror' pam_mysql.c:625: warning: format argument is not a pointer (arg 3) pam_mysql.c:628: warning: function `pam_strerror' was previously declared within a block pam_mysql.c:628: warning: format argument is not a pointer (arg 3) pam_mysql.c: In function `saltify': pam_mysql.c:636: warning: traditional C rejects ISO C style function definitions pam_mysql.c:648: warning: implicit declaration of function `time' pam_mysql.c: At top level: pam_mysql.c:673: error: parse error before '*' token pam_mysql.c:675: warning: function declaration isn't a prototype pam_mysql.c: In function `updatePasswd': pam_mysql.c:681: error: `PAM_AUTH_ERR' undeclared (first use in this function) pam_mysql.c:690: error: `user' undeclared (first use in this function) pam_mysql.c:690: error: `newpass' undeclared (first use in this function) pam_mysql.c:692: error: `oldpass' undeclared (first use in this function) pam_mysql.c:692: error: `isRoot' undeclared (first use in this function) pam_mysql.c:699: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_mysql.c:732: warning: function `make_scrambled_password' was previously declared within a block pam_mysql.c:768: warning: function `mysql_escape_string' was previously declared within a block pam_mysql.c:786: warning: function `mysql_query' was previously declared within a block pam_mysql.c:786: error: `my' undeclared (first use in this function) pam_mysql.c:789: warning: function `mysql_error' was previously declared within a block pam_mysql.c:789: warning: format argument is not a pointer (arg 3) pam_mysql.c:793: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c: At top level: pam_mysql.c:799: error: parse error before '*' token pam_mysql.c:800: warning: function declaration isn't a prototype pam_mysql.c: In function `askForPassword': pam_mysql.c:801: warning: array type has incomplete element type pam_mysql.c:801: error: storage size of `msg' isn't known pam_mysql.c:807: error: `pwprompt' undeclared (first use in this function) pam_mysql.c:811: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_mysql.c:817: error: `PAM_PROMPT_ECHO_OFF' undeclared (first use in this function) pam_mysql.c:820: error: `pamh' undeclared (first use in this function) pam_mysql.c:823: warning: implicit declaration of function `_pam_overwrite' pam_mysql.c:824: warning: implicit declaration of function `_pam_drop' pam_mysql.c:827: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c:829: warning: implicit declaration of function `_pam_drop_reply' pam_mysql.c:830: error: `PAM_CONV_AGAIN' undeclared (first use in this function) pam_mysql.c:831: error: `PAM_INCOMPLETE' undeclared (first use in this function) pam_mysql.c:831: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_mysql.c:836: warning: implicit declaration of function `pam_set_item' pam_mysql.c:836: error: `pwtype' undeclared (first use in this function) pam_mysql.c:836: error: dereferencing pointer to incomplete type pam_mysql.c:801: warning: unused variable `msg' pam_mysql.c: At top level: pam_mysql.c:839: error: parse error before '*' token pam_mysql.c:839: warning: function declaration isn't a prototype pam_mysql.c: In function `sqlLog': pam_mysql.c:849: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c:861: error: `PAM_AUTH_ERR' undeclared (first use in this function) pam_mysql.c:886: error: `user' undeclared (first use in this function) pam_mysql.c:890: error: `PAM_BUF_ERR' undeclared (first use in this function) pam_mysql.c:893: error: `msg' undeclared (first use in this function) pam_mysql.c:906: warning: function `mysql_escape_string' was previously declared within a block pam_mysql.c:952: warning: implicit declaration of function `mysql_real_query' pam_mysql.c:952: error: `auth_sql_server' undeclared (first use in this function) pam_mysql.c:963: warning: function `mysql_error' was previously declared within a block pam_mysql.c:963: warning: format argument is not a pointer (arg 3) pam_mysql.c: At top level: pam_mysql.c:978: error: syntax error before "int" pam_mysql.c:978: error: parse error before '*' token pam_mysql.c:982: warning: function declaration isn't a prototype pam_mysql.c: In function `pam_sm_authenticate': pam_mysql.c:989: error: `MYSQL' undeclared (first use in this function) pam_mysql.c:989: error: parse error before "auth_sql_server" pam_mysql.c:995: error: `argc' undeclared (first use in this function) pam_mysql.c:995: error: `argv' undeclared (first use in this function) pam_mysql.c:999: warning: implicit declaration of function `pam_get_user' pam_mysql.c:999: error: `pamh' undeclared (first use in this function) pam_mysql.c:1001: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c:1006: error: `PAM_USER_UNKNOWN' undeclared (first use in this function) pam_mysql.c:1009: warning: function `pam_get_item' was previously declared within a block pam_mysql.c:1009: error: `PAM_AUTHTOK' undeclared (first use in this function) pam_mysql.c:1009: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:1014: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:1017: error: `PAM_AUTHINFO_UNAVAIL' undeclared (first use in this function) pam_mysql.c:1019: error: `auth_sql_server' undeclared (first use in this function) pam_mysql.c: At top level: pam_mysql.c:1045: error: syntax error before "int" pam_mysql.c:1045: error: parse error before '*' token pam_mysql.c:1047: warning: function declaration isn't a prototype pam_mysql.c: In function `pam_sm_acct_mgmt': pam_mysql.c:1051: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c: At top level: pam_mysql.c:1055: error: syntax error before "int" pam_mysql.c:1055: error: parse error before '*' token pam_mysql.c:1057: warning: function declaration isn't a prototype pam_mysql.c: In function `pam_sm_setcred': pam_mysql.c:1061: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c: At top level: pam_mysql.c:1067: error: syntax error before "int" pam_mysql.c:1067: error: parse error before '*' token pam_mysql.c:1069: warning: function declaration isn't a prototype pam_mysql.c: In function `pam_sm_chauthtok': pam_mysql.c:1077: error: `MYSQL' undeclared (first use in this function) pam_mysql.c:1077: error: parse error before "auth_sql_server" pam_mysql.c:1083: error: `argc' undeclared (first use in this function) pam_mysql.c:1083: error: `argv' undeclared (first use in this function) pam_mysql.c:1087: warning: function `pam_get_user' was previously declared within a block pam_mysql.c:1087: error: `pamh' undeclared (first use in this function) pam_mysql.c:1088: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c:1093: error: `PAM_USER_UNKNOWN' undeclared (first use in this function) pam_mysql.c:1100: error: `auth_sql_server' undeclared (first use in this function) pam_mysql.c:1104: error: `flags' undeclared (first use in this function) pam_mysql.c:1104: error: `PAM_PRELIM_CHECK' undeclared (first use in this function) pam_mysql.c:1109: error: `PAM_CHANGE_EXPIRED_AUTHTOK' undeclared (first use in this function) pam_mysql.c:1112: warning: function `pam_get_item' was previously declared within a block pam_mysql.c:1112: error: `PAM_OLDAUTHTOK' undeclared (first use in this function) pam_mysql.c:1113: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:1120: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:1122: error: `PAM_AUTHTOK_ERR' undeclared (first use in this function) pam_mysql.c:1141: error: `PAM_UPDATE_AUTHTOK' undeclared (first use in this function) pam_mysql.c:1146: warning: function `pam_get_item' was previously declared within a block pam_mysql.c:1146: error: `PAM_AUTHTOK' undeclared (first use in this function) pam_mysql.c:1147: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:1158: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:1173: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c:1180: warning: dereferencing type-punned pointer will break strict-aliasing rules pam_mysql.c: At top level: pam_mysql.c:1199: error: syntax error before "int" pam_mysql.c:1199: error: parse error before '*' token pam_mysql.c:1201: warning: function declaration isn't a prototype pam_mysql.c: In function `pam_sm_open_session': pam_mysql.c:1205: error: `PAM_SUCCESS' undeclared (first use in this function) pam_mysql.c: At top level: pam_mysql.c:1209: error: syntax error before "int" pam_mysql.c:1209: error: parse error before '*' token pam_mysql.c:1211: warning: function declaration isn't a prototype pam_mysql.c: In function `pam_sm_close_session': pam_mysql.c:1215: error: `PAM_SUCCESS' undeclared (first use in this function) make: *** [dynamic/pam_mysql.o] 错误 1 |
| yw112 回复于:2005-03-25 10:14:15 |
| 我也是这样弄得
跟楼上的错误一样!! 那位大虾能指点一下呀!! |
| anstan 回复于:2005-03-25 10:26:11 |
| 假定你把mysql装在了/usr/local/mysql下,
那么你在编译pam_mysql的时候一定会出问题,(假定pam_mysql也是用tar.gz方式安装) 这时候 vi Makefile 一下,把它改成下面的样子: ifndef FULL_LINUX_PAM_SOURCE_TREE export DYNAMIC=-DPAM_DYNAMIC export CC=gcc export CFLAGS=-O2 -Dlinux -DLINUX_PAM \ -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \ -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional \ -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline \ -Wshadow -pedantic -fPIC [b:6778fee5b0]-I/usr/local/mysql/include[/b:6778fee5b0] export MKDIR=mkdir -p export LD_D=gcc -shared -Xlinker -x [b:6778fee5b0]-L/usr/local/mysql/lib/mysql [/b:6778fee5b0]-lz endif 注意粗体的部分就是你应该改的,当然,如果你按装在其它目录,那么请也相应的改一改,这样你就可以在当前目录下得到pam_mysql.so 这个模块了。 |