{"id":502,"date":"2012-03-07T11:33:13","date_gmt":"2012-03-07T07:33:13","guid":{"rendered":"http:\/\/elemc.name\/wordpress\/?p=502"},"modified":"2012-03-07T12:43:12","modified_gmt":"2012-03-07T08:43:12","slug":"wpa-wifi-%d1%87%d0%b5%d1%80%d0%b5%d0%b7-network-%d0%b2-fedora-16","status":"publish","type":"post","link":"https:\/\/elemc.name\/?p=502","title":{"rendered":"WPA wifi \u0447\u0435\u0440\u0435\u0437 network \u0432 Fedora 16"},"content":{"rendered":"<p>\u041c\u0443\u0447\u0438\u043b\u0441\u044f \u0442\u0443\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432 jabber-\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 <a href=\"http:\/\/wiki.russianfedora.ru\/index.php\/\u041a\u0430\u043a_\u0432\u043e\u0439\u0442\u0438_\u0432_Jabber_\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044e\" title=\"\u041a\u0430\u043a \u0432\u043e\u0439\u0442\u0438 \u0432 jabber \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u044e\" target=\"_blank\">fedora@conference.jabber.ru<\/a> \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c NetworkManager, \u0430 wifi \u0447\u0435\u0440\u0435\u0437 network \u0437\u0430\u0446\u0435\u043f\u0438\u0442\u044c.<br \/>\n\u0418 \u0432\u043e\u0442, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u044b\u0448\u043b\u043e&#8230;<!--more--><\/p>\n<p>1. \u0441\u0442\u0430\u0432\u0438\u043c <strong>wpa_supplicant<\/strong>:<\/p>\n<pre>yum install wpa_supplicant<\/pre>\n<p>2. \u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b \/etc\/wpa_supplicant\/wpa_supplicant.conf<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/><\/div><\/td><td><div class=\"text codecolorer\">ctrl_interface=\/var\/run\/wpa_supplicant<br \/>\nctrl_interface_group=wheel<br \/>\n<br \/>\nap_scan=1<br \/>\n<br \/>\nnetwork={<br \/>\n&nbsp; &nbsp; ssid=&quot;\u0438\u043c\u044f-\u0442\u0432\u043e\u0435\u0439-\u0441\u0435\u0442\u0438&quot;<br \/>\n&nbsp; &nbsp; proto=WPA<br \/>\n&nbsp; &nbsp; key_mgmt=WPA-PSK<br \/>\n&nbsp; &nbsp; psk=&quot;\u043f\u0430\u0440\u043e\u043b\u044c-\u0442\u0432\u043e\u0435\u0439-\u0441\u0435\u0442\u0438&quot;<br \/>\n&nbsp; &nbsp; priority=1<br \/>\n}<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f, \u0447\u0438\u0442\u0430\u0435\u043c <em>man wpa_supplicant.conf<\/em>.<\/p>\n<p>3. \u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b \/etc\/sysconfig\/wpa_supplicant:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/><\/div><\/td><td><div class=\"text codecolorer\"># Use the flag &quot;-i&quot; before each of your interfaces, like so: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n# &nbsp;INTERFACES=&quot;-ieth1 -iwlan0&quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\nINTERFACES=&quot;-iwlan0&quot;<br \/>\n<br \/>\n# Use the flag &quot;-D&quot; before each driver, like so: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n# &nbsp;DRIVERS=&quot;-Dwext&quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\nDRIVERS=&quot;-Dwext&quot;<br \/>\n<br \/>\n# Other arguments &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n# &nbsp; -u &nbsp; Enable the D-Bus interface (required for use with NetworkManager) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n# &nbsp; -f &nbsp; Log to \/var\/log\/wpa_supplicant.log &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n# &nbsp; -P &nbsp; Write pid file to \/var\/run\/wpa_supplicant.pid &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br \/>\n# &nbsp; &nbsp; &nbsp; &nbsp;required to return proper codes by init scripts (e.g. double &quot;start&quot; action) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\n# &nbsp; &nbsp; &nbsp; &nbsp;-B to daemonize that has to be used together with -P is already in wpa_supplicant.init.d &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br \/>\nOTHER_ARGS=&quot;-u -f \/var\/log\/wpa_supplicant.log -P \/var\/run\/wpa_supplicant.pid&quot;<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u0441\u043c\u043e\u0442\u0440\u0438\u043c <em>man wpa_supplicant<\/em>.<\/p>\n<p>4. \u043f\u0440\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b \/etc\/sysconfig\/network-script\/ifcfg-wlan0:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/><\/div><\/td><td><div class=\"text codecolorer\">DEVICE=wlan0<br \/>\nONBOOT=yes<br \/>\nTYPE=Wireless<br \/>\nBOOTPROTO=dhcp<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>5. <strong>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/strong> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c network.service \u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre>systemctl enable network.service<\/pre>\n<p><em>\u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e NM \u0443\u0436\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u043c:<\/em><\/p>\n<pre>systemctl disable NetworkManager.service<\/pre>\n<p>6. \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c wpa_supplicant.service \u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre>systemctl enable wpa_supplicant.service<\/pre>\n<p>\u0412\u043e\u0442, \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0438 \u0432\u0441\u0435.<br \/>\n<strong>\u0410 \u043d\u0438\u0444\u0438\u0433\u0430 \u043d\u0435 \u0432\u0441\u0435!<\/strong> systemd \u0436\u0435! \ud83d\ude00<\/p>\n<p>7. \u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 (\u044f \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u043e \u0434\u0430 \u043f\u0443\u0441\u0442\u044c \u0431\u0443\u0434\u0435\u0442):<\/p>\n<pre>ln -sf \/lib\/systemd\/system\/wpa_supplicant.service \\ \r\n\/etc\/systemd\/system\/network.target.wants\/<\/pre>\n<p>8. \u0438 \u0444\u0438\u043d\u0430\u043b! \u043f\u0440\u0430\u0432\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c wpa_supplicant \u0434\u043b\u044f systemd, \u0444\u0430\u0439\u043b \/lib\/systemd\/system\/wpa_supplicant.service:<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;width:560px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/><\/div><\/td><td><div class=\"text codecolorer\">[Unit]<br \/>\nDescription=WPA Supplicant daemon<br \/>\nAfter=syslog.target network.target<br \/>\nBefore=network.service<br \/>\n<br \/>\n[Service]<br \/>\nType=forking<br \/>\nEnvironmentFile=-\/etc\/sysconfig\/wpa_supplicant<br \/>\nExecStart=\/usr\/sbin\/wpa_supplicant -c \/etc\/wpa_supplicant\/wpa_supplicant.conf $INTERFACES $DRIVERS -B -u $OTHER_ARGS<br \/>\n<br \/>\n[Install]<br \/>\nWantedBy=multi-user.target<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p><strong>\u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a\u0443 \u21164!<\/strong><\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0436\u0435 \u0432\u0441\u0435 \ud83d\ude42<\/p>\n<p>P.S. \u041d\u0435 \u0437\u043d\u0430\u044e, \u0440\u0430\u0441\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u0430\u043a \u0431\u0430\u0433 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442&#8230; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041c\u0443\u0447\u0438\u043b\u0441\u044f \u0442\u0443\u0442 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u0432 jabber-\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 fedora@conference.jabber.ru \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u0431\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c NetworkManager, \u0430 wifi \u0447\u0435\u0440\u0435\u0437 network \u0437\u0430\u0446\u0435\u043f\u0438\u0442\u044c. \u0418 \u0432\u043e\u0442, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u044b\u0448\u043b\u043e&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[8,7],"tags":[26,44,45,94,56,93,92],"class_list":["post-502","post","type-post","status-publish","format-standard","hentry","category-fedora","category-gnulinux","tag-fedora-2","tag-network","tag-networkmanager","tag-nm","tag-systemd","tag-wifi","tag-wpa"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1TKY7-86","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/posts\/502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elemc.name\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=502"}],"version-history":[{"count":11,"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/posts\/502\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/elemc.name\/index.php?rest_route=\/wp\/v2\/posts\/502\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/elemc.name\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elemc.name\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elemc.name\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}