{"id":4431,"date":"2014-09-24T14:36:49","date_gmt":"2014-09-24T11:36:49","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=4431"},"modified":"2014-09-24T14:37:27","modified_gmt":"2014-09-24T11:37:27","slug":"exim-pam-file-%d0%b0%d1%83%d1%82%d0%b5%d0%bd%d1%82%d0%b8%d1%84%d0%b8%d0%ba%d0%b0%d1%86%d0%b8%d1%8f","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=4431","title":{"rendered":"[exim] PAM \/ file \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f"},"content":{"rendered":"<p><em><strong><span style=\"color: #008000;\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434:<\/span><\/strong><\/em> <strong>Debian linux, exim 4.80<\/strong><\/p>\n<h2><strong><span style=\"color: #0000ff;\">PAM \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/span><\/strong><\/h2>\n<p><strong><span style=\"color: #ff6600;\">&#8211; exim<\/span><\/strong><\/p>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 <strong>exim&#8217;a<\/strong> \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0431\u043b\u043e\u043a (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f <strong>exim4-daemon-heavy<\/strong>, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u0439 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 <strong>PAM<\/strong>):<\/p>\n<p><code>begin authenticators<\/code><\/p>\n<p><!--more--><\/p>\n<p><code>plain:<br \/>\ndriver = plaintext<br \/>\npublic_name = PLAIN<br \/>\nserver_prompts = :<br \/>\nserver_condition = \"${if pam{$2:$3}{1}{0}}\"<br \/>\nserver_set_id = $2<\/code><\/p>\n<p><code>login:<br \/>\ndriver = plaintext<br \/>\npublic_name = LOGIN<br \/>\nserver_prompts = \"Username:: : Password::\"<br \/>\nserver_condition = \"${if pam{$1:$2}{1}{0}}\"<br \/>\nserver_set_id = $1<br \/>\n<\/code><br \/>\n<strong><span style=\"color: #ff6600;\">&#8211; pam<\/span><\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <strong>\/etc\/pam.d\/exim<\/strong> \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p><code>auth required pam_env.so<br \/>\nauth sufficient pam_unix.so likeauth nullok<br \/>\nauth required pam_deny.so<br \/>\naccount required pam_unix.so<br \/>\npassword required pam_cracklib.so retry=3 type=<br \/>\npassword sufficient pam_unix.so nullok use_authtok md5shadow<br \/>\npassword required pam_deny.so<br \/>\nsession required pam_limits.so<br \/>\nsession required pam_unix.so<\/code><\/p>\n<h2><strong><span style=\"color: #0000ff;\">File&#8217;\u043e\u0432\u0430\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/span><\/strong><\/h2>\n<p><strong><span style=\"color: #ff6600;\">&#8211; exim<\/span><\/strong><\/p>\n<p><code>begin authenticators<\/code><\/p>\n<p><code>plain:<br \/>\ndriver = plaintext<br \/>\npublic_name = PLAIN<br \/>\nserver_prompts = :<br \/>\nserver_set_id = $auth2<br \/>\nserver_condition = \"${if exists{\/etc\/exim4\/passwd}{${lookup{$auth2}lsearch{\/etc\/exim4\/passwd}\\<br \/>\n{${if crypteq{$auth3}{\\\\\\{md5\\\\\\}${extract{1}{:}{$value}{$value}fail}}{true}{false} }}}}}\"<\/code><\/p>\n<p><code>login:<br \/>\ndriver = plaintext<br \/>\npublic_name = LOGIN<br \/>\nserver_prompts = \"Username:: : Password::\"<br \/>\nserver_set_id = $auth1<br \/>\nserver_condition = \"${if exists{\/etc\/exim4\/passwd}{${lookup{$1}lsearch{\/etc\/exim4\/passwd}\\<br \/>\n{${if crypteq{$auth2}{\\\\\\{md5\\\\\\}${extract{1}{:}{$value}{$value}fail}} {true}{false} }}}}}\"<\/code><\/p>\n<p><strong><span style=\"color: #ff6600;\">&#8211; file<\/span><\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b <strong>\/etc\/exim4\/passwd<\/strong> \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<p><code>user:passwordhash<\/code><\/p>\n<p>\u0433\u0434\u0435 \u0445\u0435\u0448\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><code>$ perl -MDigest::MD5=md5_hex -e 'print md5_hex($ARGV[0]),\"\\n\"' PASSWORD<\/code><\/p>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0445\u0435\u0448 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0430:<\/p>\n<p><code>90244047e3f0178fec0d01a9373e2ea8<\/code><\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u0430\u0439\u043b <strong>\/etc\/exim4\/passwd<\/strong> \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<p><code>user@domain.com:90244047e3f0178fec0d01a9373e2ea8<\/code><\/p>\n<h2><strong><span style=\"color: #0000ff;\">PAM\/File \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/span><\/strong><\/h2>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u044d\u0442\u0438 2 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u0435, \u0447\u0442\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043b\u0438\u0431\u043e \u0442\u0443, \u043b\u0438\u0431\u043e \u0442\u0443. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0443\u0441\u043a\u0438 \u0438\u0437 \u0431\u043b\u043e\u043a\u0430 <strong>begin authenticators<\/strong>, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u0432\u044b\u0448\u0435:<\/p>\n<p><code>begin authenticators<\/code><\/p>\n<p><code>plain:<br \/>\ndriver = plaintext<br \/>\npublic_name = PLAIN<br \/>\nserver_prompts = :<br \/>\nserver_set_id = $auth2<br \/>\nserver_condition = \"\\<br \/>\n${if exists{\/etc\/exim4\/passwd}\\<br \/>\n{${lookup{$auth2}lsearch{\/etc\/exim4\/passwd}\\<br \/>\n{${if crypteq{$auth3}{\\\\\\{md5\\\\\\}${extract{1}{:}{$value}{$value}fail}} {true}{false} }}\\<br \/>\n{${if pam{$auth2:${sg{$auth3}{:}{::}} } {true}{false}} } }}\\<br \/>\n{${if pam{$auth2:${sg{$auth3}{:}{::}} } {true}{false}} }}\"<\/code><\/p>\n<p><code>login:<br \/>\ndriver = plaintext<br \/>\npublic_name = LOGIN<br \/>\nserver_prompts = \"Username:: : Password::\"<br \/>\nserver_set_id = $auth1<br \/>\nserver_condition = \"\\<br \/>\n${if exists{\/etc\/exim4\/passwd}\\<br \/>\n{${lookup{$auth1}lsearch{\/etc\/exim4\/passwd}\\<br \/>\n{${if crypteq{$auth2}{\\\\\\{md5\\\\\\}${extract{1}{:}{$value}{$value}fail}} {true}{false} }}\\<br \/>\n{${if pam{$auth1:${sg{$auth2}{:}{::}} } {true}{false}} } }}\\<br \/>\n{${if pam{$auth1:${sg{$auth2}{:}{::}} } {true}{false}} }}\"<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0435\u043d\u0434: Debian linux, exim 4.80 PAM \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f &#8211; exim \u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 exim&#8217;a \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u0438\u0448\u0435\u043c \u0442\u0430\u043a\u043e\u0439 \u0431\u043b\u043e\u043a (\u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f exim4-daemon-heavy, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u0439 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 PAM): begin authenticators<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-4431","post","type-post","status-publish","format-standard","hentry","category-mail"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4431"}],"version-history":[{"count":2,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4431\/revisions"}],"predecessor-version":[{"id":4433,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4431\/revisions\/4433"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}