createfiles.po 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-08-08 19:28+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. msgid "Creating Essential Files and Symlinks"
  15. msgstr "创建必要的文件和符号链接"
  16. #. type: Content of: <sect1><indexterm><primary>
  17. msgid "/etc/passwd"
  18. msgstr "/etc/passwd"
  19. #. type: Content of: <sect1><indexterm><primary>
  20. msgid "/etc/group"
  21. msgstr "/etc/group"
  22. #. type: Content of: <sect1><indexterm><primary>
  23. msgid "/var/run/utmp"
  24. msgstr "/var/run/utmp"
  25. #. type: Content of: <sect1><indexterm><primary>
  26. msgid "/var/log/btmp"
  27. msgstr "/var/log/btmp"
  28. #. type: Content of: <sect1><indexterm><primary>
  29. msgid "/var/log/lastlog"
  30. msgstr "/var/log/lastlog"
  31. #. type: Content of: <sect1><indexterm><primary>
  32. msgid "/var/log/wtmp"
  33. msgstr "/var/log/wtmp"
  34. #. type: Content of: <sect1><para>
  35. msgid ""
  36. "Historically, Linux maintains a list of the mounted file systems in the file "
  37. "<filename>/etc/mtab</filename>. Modern kernels maintain this list internally "
  38. "and exposes it to the user via the <filename class=\"directory\">/proc</"
  39. "filename> filesystem. To satisfy utilities that expect the presence of "
  40. "<filename>/etc/mtab</filename>, create the following symbolic link:"
  41. msgstr ""
  42. "历史上,Linux 在 <filename>/etc/mtab</filename> 维护已经挂载的文件系统的列"
  43. "表。现代内核在内部维护该列表,并通过 <filename class=\"directory\">/proc</"
  44. "filename> 文件系统将它展示给用户。为了满足那些需要 <filename>/etc/mtab</"
  45. "filename> 的工具,执行以下命令,创建符号链接:"
  46. #. type: Content of: <sect1><screen>
  47. #, no-wrap
  48. msgid "<userinput>ln -sv /proc/self/mounts /etc/mtab</userinput>"
  49. msgstr "<userinput>ln -sv /proc/self/mounts /etc/mtab</userinput>"
  50. #. type: Content of: <sect1><para>
  51. msgid ""
  52. "Create a basic <filename>/etc/hosts</filename> file to be referenced in some "
  53. "test suites, and in one of Perl's configuration files as well:"
  54. msgstr ""
  55. "创建一个基本的 <filename>/etc/hosts</filename> 文件,一些测试套件,以及 Perl "
  56. "的一个配置文件将会使用它:"
  57. #. type: Content of: <sect1><screen>
  58. #, no-wrap
  59. msgid "<userinput>echo \"127.0.0.1 localhost $(hostname)\" &gt; /etc/hosts</userinput>"
  60. msgstr "<userinput>echo \"127.0.0.1 localhost $(hostname)\" &gt; /etc/hosts</userinput>"
  61. #. type: Content of: <sect1><para>
  62. msgid ""
  63. "In order for user <systemitem class=\"username\">root</systemitem> to be "
  64. "able to login and for the name <quote>root</quote> to be recognized, there "
  65. "must be relevant entries in the <filename>/etc/passwd</filename> and "
  66. "<filename>/etc/group</filename> files."
  67. msgstr ""
  68. "为了使得 <systemitem class=\"username\">root</systemitem> 能正常登录,而且用"
  69. "户名 <quote>root</quote> 能被正常识别,必须在文件 <filename>/etc/passwd</"
  70. "filename> 和 <filename>/etc/groups</filename> 中写入相关的条目。"
  71. #. type: Content of: <sect1><para>
  72. msgid ""
  73. "Create the <filename>/etc/passwd</filename> file by running the following "
  74. "command:"
  75. msgstr "执行以下命令创建 <filename>/etc/passwd</filename> 文件:"
  76. #. type: Content of: <sect1><screen>
  77. #, no-wrap
  78. msgid ""
  79. "<userinput>cat &gt; /etc/passwd &lt;&lt; \"EOF\"\n"
  80. "<literal>root:x:0:0:root:/root:/bin/bash\n"
  81. "bin:x:1:1:bin:/dev/null:/bin/false\n"
  82. "daemon:x:6:6:Daemon User:/dev/null:/bin/false\n"
  83. "messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false\n"
  84. "nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>\n"
  85. "EOF</userinput>"
  86. msgstr ""
  87. "<userinput>cat &gt; /etc/passwd &lt;&lt; \"EOF\"\n"
  88. "<literal>root:x:0:0:root:/root:/bin/bash\n"
  89. "bin:x:1:1:bin:/dev/null:/bin/false\n"
  90. "daemon:x:6:6:Daemon User:/dev/null:/bin/false\n"
  91. "messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false\n"
  92. "nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>\n"
  93. "EOF</userinput>"
  94. #. type: Content of: <sect1><screen>
  95. #, no-wrap
  96. msgid ""
  97. "<userinput>cat &gt; /etc/passwd &lt;&lt; \"EOF\"\n"
  98. "<literal>root:x:0:0:root:/root:/bin/bash\n"
  99. "bin:x:1:1:bin:/dev/null:/bin/false\n"
  100. "daemon:x:6:6:Daemon User:/dev/null:/bin/false\n"
  101. "messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false\n"
  102. "systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false\n"
  103. "systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false\n"
  104. "systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false\n"
  105. "systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false\n"
  106. "systemd-network:x:76:76:systemd Network Management:/:/bin/false\n"
  107. "systemd-resolve:x:77:77:systemd Resolver:/:/bin/false\n"
  108. "systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false\n"
  109. "systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false\n"
  110. "nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>\n"
  111. "EOF</userinput>"
  112. msgstr ""
  113. "<userinput>cat &gt; /etc/passwd &lt;&lt; \"EOF\"\n"
  114. "<literal>root:x:0:0:root:/root:/bin/bash\n"
  115. "bin:x:1:1:bin:/dev/null:/bin/false\n"
  116. "daemon:x:6:6:Daemon User:/dev/null:/bin/false\n"
  117. "messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false\n"
  118. "systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false\n"
  119. "systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false\n"
  120. "systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false\n"
  121. "systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false\n"
  122. "systemd-network:x:76:76:systemd Network Management:/:/bin/false\n"
  123. "systemd-resolve:x:77:77:systemd Resolver:/:/bin/false\n"
  124. "systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false\n"
  125. "systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false\n"
  126. "nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>\n"
  127. "EOF</userinput>"
  128. #. type: Content of: <sect1><para>
  129. msgid ""
  130. "The actual password for <systemitem class=\"username\">root</systemitem> "
  131. "will be set later."
  132. msgstr ""
  133. "我们以后再设置 <systemitem class=\"username\">root</systemitem> 用户的实际密"
  134. "码。"
  135. #. type: Content of: <sect1><para>
  136. msgid ""
  137. "Create the <filename>/etc/group</filename> file by running the following "
  138. "command:"
  139. msgstr "执行以下命令,创建 <filename>/etc/group</filename> 文件:"
  140. #. type: Content of: <sect1><screen>
  141. #, no-wrap
  142. msgid ""
  143. "<userinput>cat &gt; /etc/group &lt;&lt; \"EOF\"\n"
  144. "<literal>root:x:0:\n"
  145. "bin:x:1:daemon\n"
  146. "sys:x:2:\n"
  147. "kmem:x:3:\n"
  148. "tape:x:4:\n"
  149. "tty:x:5:\n"
  150. "daemon:x:6:\n"
  151. "floppy:x:7:\n"
  152. "disk:x:8:\n"
  153. "lp:x:9:\n"
  154. "dialout:x:10:\n"
  155. "audio:x:11:\n"
  156. "video:x:12:\n"
  157. "utmp:x:13:\n"
  158. "usb:x:14:\n"
  159. "cdrom:x:15:\n"
  160. "adm:x:16:\n"
  161. "messagebus:x:18:\n"
  162. "input:x:24:\n"
  163. "mail:x:34:\n"
  164. "kvm:x:61:\n"
  165. "wheel:x:97:\n"
  166. "nogroup:x:99:\n"
  167. "users:x:999:</literal>\n"
  168. "EOF</userinput>"
  169. msgstr ""
  170. "<userinput>cat &gt; /etc/group &lt;&lt; \"EOF\"\n"
  171. "<literal>root:x:0:\n"
  172. "bin:x:1:daemon\n"
  173. "sys:x:2:\n"
  174. "kmem:x:3:\n"
  175. "tape:x:4:\n"
  176. "tty:x:5:\n"
  177. "daemon:x:6:\n"
  178. "floppy:x:7:\n"
  179. "disk:x:8:\n"
  180. "lp:x:9:\n"
  181. "dialout:x:10:\n"
  182. "audio:x:11:\n"
  183. "video:x:12:\n"
  184. "utmp:x:13:\n"
  185. "usb:x:14:\n"
  186. "cdrom:x:15:\n"
  187. "adm:x:16:\n"
  188. "messagebus:x:18:\n"
  189. "input:x:24:\n"
  190. "mail:x:34:\n"
  191. "kvm:x:61:\n"
  192. "wheel:x:97:\n"
  193. "nogroup:x:99:\n"
  194. "users:x:999:</literal>\n"
  195. "EOF</userinput>"
  196. #. type: Content of: <sect1><screen>
  197. #, no-wrap
  198. msgid ""
  199. "<userinput>cat &gt; /etc/group &lt;&lt; \"EOF\"\n"
  200. "<literal>root:x:0:\n"
  201. "bin:x:1:daemon\n"
  202. "sys:x:2:\n"
  203. "kmem:x:3:\n"
  204. "tape:x:4:\n"
  205. "tty:x:5:\n"
  206. "daemon:x:6:\n"
  207. "floppy:x:7:\n"
  208. "disk:x:8:\n"
  209. "lp:x:9:\n"
  210. "dialout:x:10:\n"
  211. "audio:x:11:\n"
  212. "video:x:12:\n"
  213. "utmp:x:13:\n"
  214. "usb:x:14:\n"
  215. "cdrom:x:15:\n"
  216. "adm:x:16:\n"
  217. "messagebus:x:18:\n"
  218. "systemd-journal:x:23:\n"
  219. "input:x:24:\n"
  220. "mail:x:34:\n"
  221. "kvm:x:61:\n"
  222. "systemd-bus-proxy:x:72:\n"
  223. "systemd-journal-gateway:x:73:\n"
  224. "systemd-journal-remote:x:74:\n"
  225. "systemd-journal-upload:x:75:\n"
  226. "systemd-network:x:76:\n"
  227. "systemd-resolve:x:77:\n"
  228. "systemd-timesync:x:78:\n"
  229. "systemd-coredump:x:79:\n"
  230. "wheel:x:97:\n"
  231. "nogroup:x:99:\n"
  232. "users:x:999:</literal>\n"
  233. "EOF</userinput>"
  234. msgstr ""
  235. "<userinput>cat &gt; /etc/group &lt;&lt; \"EOF\"\n"
  236. "<literal>root:x:0:\n"
  237. "bin:x:1:daemon\n"
  238. "sys:x:2:\n"
  239. "kmem:x:3:\n"
  240. "tape:x:4:\n"
  241. "tty:x:5:\n"
  242. "daemon:x:6:\n"
  243. "floppy:x:7:\n"
  244. "disk:x:8:\n"
  245. "lp:x:9:\n"
  246. "dialout:x:10:\n"
  247. "audio:x:11:\n"
  248. "video:x:12:\n"
  249. "utmp:x:13:\n"
  250. "usb:x:14:\n"
  251. "cdrom:x:15:\n"
  252. "adm:x:16:\n"
  253. "messagebus:x:18:\n"
  254. "systemd-journal:x:23:\n"
  255. "input:x:24:\n"
  256. "mail:x:34:\n"
  257. "kvm:x:61:\n"
  258. "systemd-bus-proxy:x:72:\n"
  259. "systemd-journal-gateway:x:73:\n"
  260. "systemd-journal-remote:x:74:\n"
  261. "systemd-journal-upload:x:75:\n"
  262. "systemd-network:x:76:\n"
  263. "systemd-resolve:x:77:\n"
  264. "systemd-timesync:x:78:\n"
  265. "systemd-coredump:x:79:\n"
  266. "wheel:x:97:\n"
  267. "nogroup:x:99:\n"
  268. "users:x:999:</literal>\n"
  269. "EOF</userinput>"
  270. #. type: Content of: <sect1><para>
  271. msgid ""
  272. "The created groups are not part of any standard&mdash;they are groups "
  273. "decided on in part by the requirements of the Udev configuration in Chapter "
  274. "9, and in part by common convention employed by a number of existing Linux "
  275. "distributions. In addition, some test suites rely on specific users or "
  276. "groups. The Linux Standard Base (LSB, available at <ulink url=\"http://"
  277. "refspecs.linuxfoundation.org/lsb.shtml\"/>) only recommends that, besides "
  278. "the group <systemitem class=\"groupname\">root</systemitem> with a Group ID "
  279. "(GID) of 0, a group <systemitem class=\"groupname\">bin</systemitem> with a "
  280. "GID of 1 be present. All other group names and GIDs can be chosen freely by "
  281. "the system administrator since well-written programs do not depend on GID "
  282. "numbers, but rather use the group's name."
  283. msgstr ""
  284. "这里创建的用户组并不属于任何标准 —— 它们一部分是为了满足第 9 章中 Udev 配置的"
  285. "需要,另一部分借鉴了一些 Linux 发行版的通用惯例。另外,某些测试套件需要特定的"
  286. "用户或组。Linux Standard Base (LSB,可以在 <ulink url=\"http://www.linuxbase."
  287. "org\"/> 查看) 标准只推荐以组 ID 0 创建用户组 <systemitem class=\"groupname"
  288. "\">root</systemitem>,以及以组 ID 1 创建用户组 <systemitem class=\"groupname"
  289. "\">bin</systemitem>,其他组名和组 ID 由系统管理员自由分配,因为好的程序不会依"
  290. "赖组 ID 数字,而是使用组名。"
  291. #. type: Content of: <sect1><para>
  292. msgid ""
  293. "Some tests in <xref linkend=\"chapter-building-system\"/> need a regular "
  294. "user. We add this user here and delete this account at the end of that "
  295. "chapter."
  296. msgstr ""
  297. "<xref linkend=\"chapter-building-system\"/>中的一些测试需要使用一个普通用户。"
  298. "我们这里创建一个用户,在那一章的末尾再删除该用户。"
  299. #. type: Content of: <sect1><screen>
  300. #, no-wrap
  301. msgid ""
  302. "<userinput>echo \"tester:x:$(ls -n $(tty) | cut -d\" \" -f3):101::/home/tester:/bin/bash\" &gt;&gt; /etc/passwd\n"
  303. "echo \"tester:x:101:\" &gt;&gt; /etc/group\n"
  304. "install -o tester -d /home/tester</userinput>"
  305. msgstr ""
  306. "<userinput>echo \"tester:x:$(ls -n $(tty) | cut -d\" \" -f3):101::/home/tester:/bin/bash\" &gt;&gt; /etc/passwd\n"
  307. "echo \"tester:x:101:\" &gt;&gt; /etc/group\n"
  308. "install -o tester -d /home/tester</userinput>"
  309. #. type: Content of: <sect1><para>
  310. msgid ""
  311. "To remove the <quote>I have no name!</quote> prompt, start a new shell. "
  312. "Since the <filename>/etc/passwd</filename> and <filename>/etc/group</"
  313. "filename> files have been created, user name and group name resolution will "
  314. "now work:"
  315. msgstr ""
  316. "为了移除 <quote>I have no name!</quote> 提示符,需要打开一个新 shell。由于已"
  317. "经创建了文件 <filename>/etc/passwd</filename> 和 <filename>/etc/group</"
  318. "filename>,用户名和组名现在就可以正常解析了:"
  319. #. type: Content of: <sect1><screen>
  320. #, no-wrap
  321. msgid "<userinput>exec /bin/bash --login +h</userinput>"
  322. msgstr "<userinput>exec /bin/bash --login +h</userinput>"
  323. #. type: Content of: <sect1><para>
  324. msgid ""
  325. "Note the use of the <parameter>+h</parameter> directive. This tells "
  326. "<command>bash</command> not to use its internal path hashing. Without this "
  327. "directive, <command>bash</command> would remember the paths to binaries it "
  328. "has executed. To ensure the use of the newly compiled binaries as soon as "
  329. "they are installed, the <parameter>+h</parameter> directive will be used for "
  330. "the duration of this and the next chapter."
  331. msgstr ""
  332. "注意这里使用了 <parameter>+h</parameter> 参数。它告诉 <command>bash</"
  333. "command> 不要使用内部的路径散列机制。如果没有指定该参数,<command>bash</"
  334. "command> 会记忆它执行过程序的路径。为了在安装新编译好的程序后马上使用它们,在"
  335. "本章和下一章中总是使用 <parameter>+h</parameter>。"
  336. #. type: Content of: <sect1><para>
  337. msgid ""
  338. "The <command>login</command>, <command>agetty</command>, and <command>init</"
  339. "command> programs (and others) use a number of log files to record "
  340. "information such as who was logged into the system and when. However, these "
  341. "programs will not write to the log files if they do not already exist. "
  342. "Initialize the log files and give them proper permissions:"
  343. msgstr ""
  344. "<command>login</command>、<command>agetty</command> 和 <command>init</"
  345. "command> 等程序使用一些日志文件,以记录登录系统的用户和登录时间等信息。然而,"
  346. "这些程序不会创建不存在的日志文件。初始化日志文件,并为它们设置合适的访问权"
  347. "限:"
  348. #. type: Content of: <sect1><screen>
  349. #, no-wrap
  350. msgid ""
  351. "<userinput>touch /var/log/{btmp,lastlog,faillog,wtmp}\n"
  352. "chgrp -v utmp /var/log/lastlog\n"
  353. "chmod -v 664 /var/log/lastlog\n"
  354. "chmod -v 600 /var/log/btmp</userinput>"
  355. msgstr ""
  356. "<userinput>touch /var/log/{btmp,lastlog,faillog,wtmp}\n"
  357. "chgrp -v utmp /var/log/lastlog\n"
  358. "chmod -v 664 /var/log/lastlog\n"
  359. "chmod -v 600 /var/log/btmp</userinput>"
  360. #. type: Content of: <sect1><para>
  361. msgid ""
  362. "The <filename>/var/log/wtmp</filename> file records all logins and logouts. "
  363. "The <filename>/var/log/lastlog</filename> file records when each user last "
  364. "logged in. The <filename>/var/log/faillog</filename> file records failed "
  365. "login attempts. The <filename>/var/log/btmp</filename> file records the bad "
  366. "login attempts."
  367. msgstr ""
  368. "文件 <filename>/var/log/wtmp</filename> 记录所有的登录和登出,文件 "
  369. "<filename>/var/log/lastlog</filename> 记录每个用户最后登录的时间,文件 "
  370. "<filename>/var/log/faillog</filename> 记录所有失败的登录尝试,文件 "
  371. "<filename>/var/log/btmp</filename> 记录所有错误的登录尝试。"
  372. #. type: Content of: <sect1><note><para>
  373. msgid ""
  374. "The <filename>/run/utmp</filename> file records the users that are currently "
  375. "logged in. This file is created dynamically in the boot scripts."
  376. msgstr ""
  377. "文件 <filename>/run/utmp</filename> 记录当前登录的用户,它由引导脚本动态创"
  378. "建。"