<br />
<b>Warning</b>:  Undefined array key "HTTP_ACCEPT_LANGUAGE" in <b>/www/wwwroot/01xj.net/wp-content/plugins/wp-ue/main.php</b> on line <b>13</b><br />
{"id":141,"date":"2011-09-24T13:22:36","date_gmt":"2011-09-24T13:22:36","guid":{"rendered":"http:\/\/www.01xj.net\/0\/?p=141"},"modified":"2011-09-24T13:22:36","modified_gmt":"2011-09-24T13:22:36","slug":"freebsd-%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.01xj.net\/?p=141","title":{"rendered":"FreeBSD \u5e38\u7528\u547d\u4ee4"},"content":{"rendered":"<p>1.\u5982\u4f55\u4fee\u6539\u5176\u5b83\u7528\u6237\u5bc6\u7801\uff1fpasswd -l lizl\u3002<\/p>\n<p>2.freebsd\u7684\u5bc6\u7801\u6587\u4ef6\u67092\u4e2a\uff0c\/etc \/passwd \u548c\/etc\/master.passwd,\u540c\u65f6\u4f7f\u7528\/etc\/pwd.db\u548c\/etc\/spwd.db\u6570\u636e\u5e93\u63d0\u9ad8\u6027\u80fd\u3002\u4f7f\u7528vipw\u53ef\u4ee5\u540c\u6b65\u4fee\u6539\u8fd92\u4e2a\u6587\u4ef6<\/p>\n<p>3.sh\u7684\u5168\u5c40\u914d\u7f6e\u6587\u4ef6 \/etc\/profile\uff0ccsh\u7684\u5168\u5c40\u914d\u7f6e\u6587\u4ef6\/etc\/csh.cshrc\uff0ccsh.login\u548ccsh.logout.<\/p>\n<p>\u5e38\u89c1shell\u5b9a\u4e49\u6587\u4ef6 \/etc\/shells\uff08\u6bd4\u5982\u5b89\u88c5bash\u540e\u9700\u8981\u4fee\u6539\u8be5\u6587\u4ef6\u4f7f\u4e4b\u751f\u6548\uff09<\/p>\n<p>\/usr\/bin\/chsh -s bash \u4fee\u6539\u5f53\u524d\u7528\u6237\u9ed8\u8ba4\u7684shell\u4e3abash\uff0cshell\u7684\u9ed8\u8ba4\u914d\u7f6e\u6587\u4ef6\u5728\/usr\/share\/skel\u4e0b<\/p>\n<p>~\/.bash-history \u8bb0\u5f55sh\u5386\u53f2\u547d\u4ee4;~\/.history\u8bb0\u5f55csh\u5386\u53f2\u547d\u4ee4<\/p>\n<p>4.\/var\/log\/\u4e0b\u7684\u6587\u4ef6\u4ecb\u7ecd<\/p>\n<p>lastlog \u4fdd\u5b58\u6bcf\u4e2a\u7528\u6237\u6700\u540e\u4e00\u6b21\u767b\u5f55\u4fe1\u606f<\/p>\n<p>utmp \u4fdd\u5b58\u5f53\u524d\u7cfb\u7edf\u7528\u6237\u7684\u767b\u5f55\u8bb0\u5f55 \uff08who\uff0cu\u547d\u4ee4\uff09<\/p>\n<p>wtmp \u4fdd\u5b58\u6240\u6709\u767b\u5f55\uff0c\u9000\u51fa\u4ee5\u53ca\u7cfb\u7edf\u542f\u52a8\uff0c\u5173\u95ed\u7b49\u8bb0\u5f55 \uff08last\uff0cap\u547d\u4ee4\uff09<\/p>\n<p>\/etc\/syslog.conf \u914d\u7f6e\u65e5\u5fd7\u4fdd\u5b58\u76ee\u5f55\u7b49\u4fe1\u606f<\/p>\n<p>5.\u914d\u7f6esudo\u7ec4\u7528\u6237\uff0c\u4fee\u6539visudo \/etc\/sudoers<\/p>\n<p>root ALL=(ALL) ALL\uff08\u7528\u6237\uff09<\/p>\n<p>%wheel ALL=(ALL) ALL\uff08\u7ec4\uff09<\/p>\n<p>6.\u53ea\u6709wheel\u7ec4\u7684\u7528\u6237\u624d\u80fd\u4f7f\u7528su<\/p>\n<p>7.\/etc\/fstab \u5f00\u673a\u52a0\u8f7d\u7684\u5206\u533a\uff08mount\uff0cdf\u547d\u4ee4\uff09<\/p>\n<p>\/etc\/fbtab change device protection upon login<\/p>\n<p>8.\u68c0\u67e5\u78c1\u76d8\u547d\u4ee4 \/stand\/fsck<\/p>\n<p>9.\u5b89\u88c5\u5411\u5bfc\u5de5\u5177 \/stand\/sysinstall<\/p>\n<p>10.\/stand\/zcat \u67e5\u770b\u538b\u7f29\u5305\u6587\u4ef6<\/p>\n<p>11.\/etc\/ttys \u8bb0\u5f55\u4e86\u6240\u6709\u5141\u8bb8\u4f60\u767b\u5f55\u7684\u7aef\u53e3\uff0c\u7c7b\u4f3c\u4e8ewindow\u4e2d\u7684\u7aef\u53e3\u7684\u6982\u5ff5\uff0c\u6bd4\u59823306\u7aef\u53e3<\/p>\n<p>12.\/usr\/sbin\/kbdcontrol \u66f4\u6539\u952e\u76d8\u8bbe\u7f6e \/usr\/share\/syscons\/keymaps<\/p>\n<p>13.\/usr\/sbin\/vidcontrol \u66f4\u6539\u5b57\u4f53\u8bbe\u7f6e \/usr\/share\/syscons\/fonts<\/p>\n<p>14.\/usr\/sbin\/vidcontrol \u66f4\u6539\u9f20\u6807\u8bbe\u7f6e<\/p>\n<p>15.\u67e5\u770b\u7248\u672c\u4fe1\u606f uname -v<\/p>\n<p>16.\/etc\/rc.conf \u7cfb\u7edf\u542f\u52a8\u811a\u672c<\/p>\n<p>17.\/usr\/sbin\/tzsetup \u8bbe\u7f6e\u65f6\u533a \/usr\/share\/zoneinfo<\/p>\n<p>18.\/usr\/bin\/jobs \u67e5\u770b\u6b63\u5728\u540e\u53f0\u8fd0\u884c\u7684\u8fdb\u7a0b\uff0cfg $1(%1)\u5207\u6362\u5230\u524d\u53f0\u5de5\u4f5c\uff0c\u4f7f\u7528ps\u67e5\u627e\u8fdb\u7a0b\u53f7\u5e76\u7528kill pid\uff08kill -9 pid\uff09\u6740\u6b7b\u8fdb\u7a0b<\/p>\n<p>19.\/usr\/sbin\/pstat\uff0c\/usr\/bin\/vmstat\uff0c\/usr\/bin\/systat \uff0c\/usr\/bin\/fstat\uff0c\/usr\/sbin\/iostat\uff0c\/usr\/bin\/netstat\uff0cusr\/bin\/nfsstat \uff0c\/usr\/bin\/top\u67e5\u770b\u7cfb\u7edf\u72b6\u6001<\/p>\n<p>20.\/etc\/crontab root\u7684crontab\u6587\u4ef6 \uff0ccrontab -l \u67e5\u770b\u81ea\u5df1\u7684crontab\u6587\u4ef6\uff0ccrontab -e \u7f16\u8f91\u81ea\u5df1\u7684crontab\u6587\u4ef6\uff0ccrontab -r \u5220\u9664\u81ea\u5df1\u7684crontab\u6587\u4ef6<\/p>\n<p>\u7528\u6237\u81ea\u5df1\u7684crontab\u6587\u4ef6\u5b58\u653e\u5728\/var\/cron\/tabs\u4e0b\uff08 \/usr\/sbin\/cron crontab\uff09<\/p>\n<p>21.\/var\/at\/at.allow \u548c\/var\/at\/at.deny\uff08atrm \u5220\u9664at\u4f5c\u4e1a\uff0catq\u67e5\u770b\u6ca1\u6709\u6267\u884c\u7684at\u547d\u4ee4\uff09<\/p>\n<p>22.pkg_info \u67e5\u770b\u6240\u6709\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\uff08pkg_info -a\u67e5\u770b\u8be6\u7ec6\uff09pkg_delete\u5220\u9664 pkg_add\u5b89\u88c5\u8f6f\u4ef6\u5305<\/p>\n<p>23.\/etc\/inetd.conf \u7cfb\u7edf\u63d0\u4f9b\u7684\u670d\u52a1\uff0c\u5b88\u62a4\u8fdb\u7a0bdaemon\u4e3await\uff0c\u975e\u5b88\u62a4\u8fdb\u7a0b\u4e3anowait<\/p>\n<p>24.\/etc\/services\u7aef\u53e3\u5b9a\u4e49\u5e94\u7528\u7a0b\u5e8f\u7c7b\u578b<\/p>\n<p>25.\/bin\/hostname \u8bbe\u7f6e\u673a\u5668\u540d\uff0c\/sbin\/ifconfig IP\u5730\u5740\u7528\u9ed8\u8ba4\u7684\u63a9\u7801\u8bbe\u7f6eIp\u5730\u5740\uff0cifconfig (-a)\u67e5\u770b\u7f51\u7edc\u4fe1\u606f ifconfig lnc0 192.168.115.188 alias \u8bbe\u7f6e\u7f51\u7edc\u522b\u540difconfig lnc0 delete 192.168.115.188 \u5220\u9664\u7f51\u7edc\u522b\u540d<\/p>\n<p>26.\/sbin\/route\u8bbe\u7f6e\u8def\u7531\u3002\u8bbe\u7f6e\u9ed8\u8ba4\u7f51\u5173route add default 192.168.115.255 \u8bbe\u7f6e\u9759\u6001\u8def\u7531 route add -net 192.168.10.0\/24 192.168.1.253 \u67e5\u770b\u8def\u7531\u8868<\/p>\n<p>\/usr\/bin\/netstat -r<\/p>\n<p>27.\/etc\/hosts\u4e0e\/etc\/resolv.conf\u8ba1\u7b97\u673a\u540d\u5b57\u548cip\u7684\u8f6c\u6362\uff0c\/etc\/host.conf\u5b9a\u4e49\u89e3\u6790\u7684\u987a\u5e8f<\/p>\n<p>28.\/usr\/sbin\/traceroute 192.168.1.115 \u8ddf\u8e2a\u5230\u8fbe\u5730\u5740\u7684\u6240\u6709\u8bf7\u6c42\uff0c\u4f1a\u4ea7\u751f\u5927\u91cf\u7684\u7f51\u7edc\u6d41\u91cf\uff0c\u614e\u7528<\/p>\n<p>29.\/usr\/sbin\/nslookup <a href=\"http:\/\/www.jfox.info\/\" target=\"_blank\">http:\/\/www.jfox.info<\/a> \u67e5\u627eDNS\u670d\u52a1\u5668<\/p>\n<p>30.\u4e32\u53e3\u8bbe\u5907\u6807\u793asio1,sio2\u3002\u5149\u9a71\u6807\u793aacd0c<\/p>\n<p>31.BIND \u670d\u52a1\u7a0b\u5e8f\/usr\/sbin\/named\uff0c<tt>\/etc\/namedb\/named.conf<\/tt> \u57df\u540d\u670d\u52a1\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>32.\/usr\/sbin\/sendmail \u9ed8\u8ba4\u5b89\u88c5\u7684\u90ae\u4ef6\u670d\u52a1\u5668<\/p>\n<p>33.NFS\uff08\/usr\/bin\/showmount\uff09<\/p>\n<p>34.\/etc\/amd.map \u81ea\u52a8\u5b89\u88c5\u5b88\u62a4\u8fdb\u7a0bAMD (\/usr\/sbin\/amd)<\/p>\n<p>35.\/usr\/ports port\u8f6f\u4ef6\u5305<\/p>\n<p>36.tar.gz\u548ctgz \u4f7f\u7528gzip\u538b\u7f29\uff0c\u7528\/usr\/bin\/tar xzvf\u89e3\u538b\u7f29\uff1btar.bz2\u4f7f\u7528bzip2\u538b\u7f29\uff0c\/usr\/bin\/bunzip2\u89e3\u538b\u7f29.<\/p>\n<p>37.\u9759\u6001\u94fe\u63a5\uff0c\u5c06\u5e93\u7f16\u8bd1\u5230\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u3002\u52a8\u6001\u94fe\u63a5\uff0c\u5e93\u548c\u7a0b\u5e8f\u5206\u522b\u8f7d\u5165\uff0c\u5e76\u4e14\u5e93\u662f\u4f7f\u7528\u52a8\u6001\u94fe\u63a5\u5e93\u5b9e\u65f6\u94fe\u63a5\uff1belf\u6267\u884c\u6587\u4ef6\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u4f4d\u7f6e\/usr\/lib\uff0ca.out\u5728\/usr\/lib\/aout\uff08\/usr\/bin\/ldd \/usr\/sbin\/vi \u663e\u793a\u4e00\u4e2a\u53ef\u6267\u884c\u7a0b\u5e8fvi\u4f7f\u7528\u7684\u5171\u4eab\u5e93\uff09\u3002<\/p>\n<p>38.FreeBSD 3.x\u4e4b\u540eELF\u683c\u5f0f\u6210\u4e3a\u7f3a\u7701\u7684\u6267\u884c\u6587\u4ef6\u683c\u5f0f<\/p>\n<p>39.\/usr\/compat\/linux \u517c\u5bb9linux\u5e94\u7528\u7684\u6839\u76ee\u5f55<\/p>\n<p>40.mkdir -p \/usr\/compat\/linux\/var\/local\/lib\/rpm\u5d4c\u5957\u751f\u6210\u76ee\u5f55\uff0c\u5373\u4f7f\u4e0a\u7ea7\u76ee\u5f55\u5e76\u4e0d\u5b58\u5728<\/p>\n<p>41.\/usr\/src\/sys freebsd \u5185\u6838\u6e90\u7801\uff0csys\/i386\/conf\/\u4e3a\u5185\u6838\u914d\u7f6e\u6587\u4ef6\u3002\u6ce8\u610f\u6700\u5c0f\u5316\u5b89\u88c5\u4e0d\u4f1a\u5b89\u88c5\u6b64\u9879<\/p>\n<p>42.\/usr\/sbin\/tcpdump<\/p>\n<p>43.freebsd\u81ea\u5e26\u9632\u706b\u5899\u5728\u5185\u6838\u4e2d\u5b9e\u73b0\uff0c\u9700\u8981\u5728\u7f16\u8bd1\u5185\u6838\u65f6\u6253\u5f00\u4e0b\u9762\u9009\u9879\u91cd\u65b0\u5b9a\u5236\u5185\u6838options IPFIREWALL\uff0c\/sbin\/ipfw \u8bbe\u7f6e\u5305\u8fc7\u6ee4\u89c4\u5219\uff0c\/etc\/rc.firewall\u8fc7\u6ee4\u89c4\u5219\u6587\u4ef6\uff0c\u9700\u8981\u5728rc.conf\u4e2d\u7528firewall_enable =\u201dyes\u201d\u542f\u7528\u5e76\u8bfb\u53d6<\/p>\n<p>44.\/sbin\/natd(gateway_enable,natd_enable) \u7f51\u7edc\u5730\u5740\u8f6c\u6362<\/p>\n<p>45.ipfilter\u5305\u8fc7\u6ee4 \u89c4\u5219\u6587\u4ef6\/etc\/ipnat.conf \/sbin\/ipnat<\/p>\n<p>46.\u57fa\u4e8eIP\u6570\u636e\u5305\u8fc7\u6ee4\u7684\u9632\u706b\u5899\u548c\u57fa\u4e8e\u4ee3\u7406\u7684\u9632\u706b\u5899<\/p>\n<p>47.\u53ef\u4ee5\u4f7f\u7528C\u8fd9\u6837\u7684\u7f16\u8bd1\u578b\u8bed\u8a00\u6765\u7f16\u5199CGI\u7a0b\u5e8f\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u89e3\u91ca\u578b\u7684\u8bed\u8a00\u6765\u7f16\u5199CGI\u7a0b\u5e8f<\/p>\n<p>48.\u57fa\u4e8eDNS\u7684\u8d1f\u8f7d\u5747\u8861\uff08yahoo\uff09\u548c\u53cd\u5411\u4ee3\u7406\u7684\u8d1f\u8f7d\u5747\u8861\uff0c\u57fa\u4e8eNAT\u7684\u8d1f\u8f7d\u5747\u8861<\/p>\n<p>49.freebsd\u9ed8\u8ba4\u652f\u6301\/usr\/sbin\/jail\u3002\uff08imprison process and his descendants\uff09<\/p>\n<p>50.\u5b89\u88c5\u6e90\u7801\/stand\/sysintall Configure-&gt;Distributions-&gt;src-&gt;sys<\/p>\n<p>51.\/usr\/sbin\/arp \uff0c\u65e0\u9700\u5b89\u88c5<\/p>\n<p>52.dhcp\u9700\u8981\u5b89\u88c5\u8f6f\u4ef6\u5305\uff0c\u5e76\u4e14\u5185\u6838\u652f\u6301\u4f2a\u8bbe\u5907bpfilter\u3002DHCP\u5ba2\u6237\u673a\u548c\u670d\u52a1\u5668\u8f6f\u4ef6ISC-DHCP\u548cWIDE-DHCP\uff0c\u524d\u8005\u66f4\u5e38\u7528<\/p>\n<p>53.\/etc\/ssh\/sshd_config \u767b\u5f55\u8bbe\u7f6essh<\/p>\n<p>54.\u73af\u5883\u53d8\u91cf\u7684\u8bbe\u7f6e\u6839\u636eshell\u7684\u79cd\u7c7b\u800c\u4e0d\u540c\uff0c\u5728sh\u4e2d\u4f7f\u7528export\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1b\u5728csh\u4e2d\u4f7f\u7528setenv\u6765\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff1b<\/p>\n<p>55.\/bin\/echo $path \u67e5\u770b\u5355\u4e2a\u73af\u5883\u53d8\u91cf\uff0cset\u67e5\u770b\u5168\u90e8shell\u53d8\u91cf\uff08\u672c\u5730\u53d8\u91cf\uff09\uff0c\/usr\/bin\/env\u67e5\u770b\u5168\u90e8\u7cfb\u7edf\u73af\u5883\u53d8\u91cf<\/p>\n<p>56. \/usr\/bin\/whereis\u548c\/usr\/bin\/which\u7684\u533a\u522b\u3002whereis\u67e5\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u8bf4\u660e\u6587\u6863\uff0c\u6e90\u6587\u4ef6\uff1bwhich\u53ea\u5728env\u4e2d\u8bbe\u7f6e\u7684path\u4e2d\u5bfb\u627e\u53ef\u6267\u884c\u6587\u4ef6<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5982\u4f55\u4fee\u6539\u5176\u5b83\u7528\u6237\u5bc6\u7801\uff1fpasswd -l lizl\u3002 2.fre&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-141","post","type-post","status-publish","format-standard","hentry","category-freebsd-"],"_links":{"self":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts\/141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=141"}],"version-history":[{"count":1,"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/www.01xj.net\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions\/142"}],"wp:attachment":[{"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.01xj.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}