{"id":366,"date":"2011-02-17T15:43:04","date_gmt":"2011-02-17T09:43:04","guid":{"rendered":"http:\/\/norfolk.valman.org\/blog\/?p=366"},"modified":"2019-03-07T15:25:38","modified_gmt":"2019-03-07T09:25:38","slug":"%d0%ba%d0%be%d0%bc%d0%b0%d0%bd%d0%b4%d1%8b-%d0%bf%d1%83%d1%82%d0%b8-%d1%84%d0%b0%d0%b9%d0%bb%d1%8b","status":"publish","type":"post","link":"https:\/\/notes.norfolks.fun\/?p=366","title":{"rendered":"\u041a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u0443\u0442\u0438, \u0444\u0430\u0439\u043b\u044b"},"content":{"rendered":"<p>&#171;\u0412\u0441\u0435 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b&#187; (\u0441)<br \/><em>\u043a<\/em> &#8212; \u043a\u043e\u043c\u0430\u043d\u0434\u0430<br \/><em>\u0444<\/em> &#8212; \u0444\u0430\u0439\u043b<br \/><em>\u043f<\/em> &#8212; \u043f\u0443\u0442\u044c<\/p>\n<hr \/>\n<p>k: <strong>which\u00a0<\/strong>&#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b [which apache2]<\/p>\n<hr \/>\n<p><em>\u043a<\/em>: <strong>df -h<\/strong> &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0434\u0438\u0441\u043a\u0430\u0445;<br \/><em>\u043a<\/em>: <strong>du -sh<\/strong> \/\u043f\u0430\u043f\u043a\u0430\/ &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043f\u043a\u0438\/\u0444\u0430\u0439\u043b\u0430;<br \/><em>\u043a<\/em>: cat \/dev\/null &gt; file.txt &#8212; \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b<\/p>\n<hr \/>\n<p><em>\u043f<\/em>: <strong>\/etc\/php5\/apache2\/php.ini<\/strong> &#8212; \u0444\u0430\u0439\u043b php.ini<\/p>\n<hr \/>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u043c\u0438:<br \/><em>\u0444<\/em>: <strong>\/etc\/network\/interfaces<\/strong> &#8212; \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b;<br \/><em>\u043a<\/em>: <strong>\/etc\/init.d\/networking<\/strong> start | stop | restart<\/p>\n<hr \/>\n<p><em>\u043a<\/em>: <strong>\/etc\/init.d\/mysql<\/strong> restart start | stop | restart &#8212; \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430, \u0437\u0430\u043f\u0443\u0441\u043a, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a MySql<\/p>\n<hr \/>\n<p><em>\u0444<\/em>: <strong>\/etc\/fstab<\/strong> &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431\u043e \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (\u0430\u0432\u0442\u043e\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b);<br \/><em>\u0444<\/em>: <strong>\/etc\/hostname<\/strong> &#8212; \u0432 \u0444\u0430\u0439\u043b\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430<br \/><em>\u043a<\/em>: <strong>hostname<\/strong> &#8212; \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\/\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430<br \/><em>\u0444<\/em>:\u00a0<strong>\/etc\/udev\/rules.d\/*-persistent-net.rules<\/strong> &#8212; \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (eth0, eth1, eth&#8230;). \u0417\u0434\u0435\u0441\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\/\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c.<\/p>\n<hr \/>\n<p><strong>tcpdump -n -i eth0 host xxx.xxx.xxx.xxx<\/strong> &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 eth0 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430<br \/><strong>tcpdump -i eth0 port not 22 and port not 80<\/strong> &#8212; \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043a\u0440\u043e\u043c\u0435 22 \u0438 80 \u043f\u043e\u0440\u0442\u0430<br \/>\u0417\u0430\u0445\u0432\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 http-\u0441\u0435\u0441\u0441\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/p>\n<pre lang=\"bash\">tcpdump -l -s0 -w - tcp dst port 80 | strings\ntcpdump -l -s0 -w - tcp src port 80 | strings<\/pre>\n<hr \/>\n<p>\u0412\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043b\u0435\u0436\u0430\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435 <strong>\/etc\/passwd<\/strong><br \/>\u0424\u043e\u0440\u043c\u0430\u0442 \u0444\u0430\u0439\u043b\u0430 <em>\/etc\/passwd<\/em> . \u042d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c:<\/p>\n<pre lang=\"txt\">username:pswd:uid:gid:uid comments:directory:shell<\/pre>\n<p><code>\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/code><\/p>\n<pre lang=\"bash\">$ usermod<\/pre>\n<p><code>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  \u0432 \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443<\/code><\/p>\n<pre lang=\"bash\">$ useradd -G {group-name} username<\/pre>\n<hr \/>\n<p><strong>\u0416\u0435\u043b\u0435\u0437\u043e<\/strong><br \/>fdisk -l | grep Disk &#8212; \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0436\u0435\u0441\u0442\u043a\u0438\u0445 \u0434\u0438\u0441\u043a\u043e\u0432<br \/>cat \/proc\/diskstats &#8212; \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b \u0436\u0435\u0441\u0442\u043a\u0438\u0445 \u0434\u0438\u0441\u043a\u043e\u0432<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#171;\u0412\u0441\u0435 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b&#187; (\u0441)\u043a &#8212; \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0444 &#8212; \u0444\u0430\u0439\u043b\u043f &#8212; \u043f\u0443\u0442\u044c k: which\u00a0&#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b [which apache2] \u043a: df -h &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u043d\u0430 \u0434\u0438\u0441\u043a\u0430\u0445;\u043a: du -sh \/\u043f\u0430\u043f\u043a\u0430\/ &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043f\u043a\u0438\/\u0444\u0430\u0439\u043b\u0430;\u043a: cat \/dev\/null &gt; file.txt &#8212; \u043e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b &hellip; <a href=\"https:\/\/notes.norfolks.fun\/?p=366\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-366","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts\/366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=366"}],"version-history":[{"count":30,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts\/366\/revisions"}],"predecessor-version":[{"id":2796,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=\/wp\/v2\/posts\/366\/revisions\/2796"}],"wp:attachment":[{"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.norfolks.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}