createfiles.po 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. # SOME DESCRIPTIVE TITLE
  2. # Copyright (C) YEAR Free Software Foundation, Inc.
  3. # This file is distributed under the same license as the PACKAGE package.
  4. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5. #
  6. #, fuzzy
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: PACKAGE VERSION\n"
  10. "POT-Creation-Date: 2020-06-17 12:44+0800\n"
  11. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  12. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  13. "Language-Team: LANGUAGE <LL@li.org>\n"
  14. "Language: \n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. #. type: Content of: <sect1><title>
  19. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:11
  20. msgid "Creating Essential Files and Symlinks"
  21. msgstr ""
  22. #. type: Content of: <sect1><indexterm><primary>
  23. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:14
  24. msgid "/etc/passwd"
  25. msgstr ""
  26. #. type: Content of: <sect1><indexterm><primary>
  27. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:18
  28. msgid "/etc/group"
  29. msgstr ""
  30. #. type: Content of: <sect1><indexterm><primary>
  31. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:22
  32. msgid "/var/run/utmp"
  33. msgstr ""
  34. #. type: Content of: <sect1><indexterm><primary>
  35. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:26
  36. msgid "/var/log/btmp"
  37. msgstr ""
  38. #. type: Content of: <sect1><indexterm><primary>
  39. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:30
  40. msgid "/var/log/lastlog"
  41. msgstr ""
  42. #. type: Content of: <sect1><indexterm><primary>
  43. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:34
  44. msgid "/var/log/wtmp"
  45. msgstr ""
  46. #. type: Content of: <sect1><para>
  47. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:37
  48. msgid ""
  49. "Historically, Linux maintains a list of the mounted file systems in the file "
  50. "<filename>/etc/mtab</filename>. Modern kernels maintain this list internally "
  51. "and exposes it to the user via the <filename "
  52. "class=\"directory\">/proc</filename> filesystem. To satisfy utilities that "
  53. "expect the presence of <filename>/etc/mtab</filename>, create the following "
  54. "symbolic link:"
  55. msgstr ""
  56. #. type: Content of: <sect1><screen>
  57. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:44
  58. #, no-wrap
  59. msgid "<userinput>ln -sv /proc/self/mounts /etc/mtab</userinput>"
  60. msgstr ""
  61. #. type: Content of: <sect1><para>
  62. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:46
  63. msgid ""
  64. "Create a basic <filename>/etc/hosts</filename> file to be referenced in some "
  65. "test suites, and in one of Perl's configuration files as well:"
  66. msgstr ""
  67. #. type: Content of: <sect1><screen>
  68. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:50
  69. #, no-wrap
  70. msgid ""
  71. "<userinput>echo \"127.0.0.1 localhost $(hostname)\" &gt; "
  72. "/etc/hosts</userinput>"
  73. msgstr ""
  74. #. type: Content of: <sect1><para>
  75. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:52
  76. msgid ""
  77. "In order for user <systemitem class=\"username\">root</systemitem> to be "
  78. "able to login and for the name <quote>root</quote> to be recognized, there "
  79. "must be relevant entries in the <filename>/etc/passwd</filename> and "
  80. "<filename>/etc/group</filename> files."
  81. msgstr ""
  82. #. type: Content of: <sect1><para>
  83. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:57
  84. msgid ""
  85. "Create the <filename>/etc/passwd</filename> file by running the following "
  86. "command:"
  87. msgstr ""
  88. #. type: Content of: <sect1><screen>
  89. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:60
  90. #, no-wrap
  91. msgid ""
  92. "<userinput>cat &gt; /etc/passwd &lt;&lt; \"EOF\"\n"
  93. "<literal>root:x:0:0:root:/root:/bin/bash\n"
  94. "bin:x:1:1:bin:/dev/null:/bin/false\n"
  95. "daemon:x:6:6:Daemon User:/dev/null:/bin/false\n"
  96. "messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false\n"
  97. "nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>\n"
  98. "EOF</userinput>"
  99. msgstr ""
  100. #. type: Content of: <sect1><screen>
  101. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:68
  102. #, no-wrap
  103. msgid ""
  104. "<userinput>cat &gt; /etc/passwd &lt;&lt; \"EOF\"\n"
  105. "<literal>root:x:0:0:root:/root:/bin/bash\n"
  106. "bin:x:1:1:bin:/dev/null:/bin/false\n"
  107. "daemon:x:6:6:Daemon User:/dev/null:/bin/false\n"
  108. "messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false\n"
  109. "systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false\n"
  110. "systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false\n"
  111. "systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false\n"
  112. "systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false\n"
  113. "systemd-network:x:76:76:systemd Network Management:/:/bin/false\n"
  114. "systemd-resolve:x:77:77:systemd Resolver:/:/bin/false\n"
  115. "systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false\n"
  116. "systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false\n"
  117. "nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal>\n"
  118. "EOF</userinput>"
  119. msgstr ""
  120. #. type: Content of: <sect1><para>
  121. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:84
  122. msgid ""
  123. "The actual password for <systemitem class=\"username\">root</systemitem> "
  124. "will be set later."
  125. msgstr ""
  126. #. type: Content of: <sect1><para>
  127. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:87
  128. msgid ""
  129. "Create the <filename>/etc/group</filename> file by running the following "
  130. "command:"
  131. msgstr ""
  132. #. type: Content of: <sect1><screen>
  133. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:90
  134. #, no-wrap
  135. msgid ""
  136. "<userinput>cat &gt; /etc/group &lt;&lt; \"EOF\"\n"
  137. "<literal>root:x:0:\n"
  138. "bin:x:1:daemon\n"
  139. "sys:x:2:\n"
  140. "kmem:x:3:\n"
  141. "tape:x:4:\n"
  142. "tty:x:5:\n"
  143. "daemon:x:6:\n"
  144. "floppy:x:7:\n"
  145. "disk:x:8:\n"
  146. "lp:x:9:\n"
  147. "dialout:x:10:\n"
  148. "audio:x:11:\n"
  149. "video:x:12:\n"
  150. "utmp:x:13:\n"
  151. "usb:x:14:\n"
  152. "cdrom:x:15:\n"
  153. "adm:x:16:\n"
  154. "messagebus:x:18:\n"
  155. "input:x:24:\n"
  156. "mail:x:34:\n"
  157. "kvm:x:61:\n"
  158. "wheel:x:97:\n"
  159. "nogroup:x:99:\n"
  160. "users:x:999:</literal>\n"
  161. "EOF</userinput>"
  162. msgstr ""
  163. #. type: Content of: <sect1><screen>
  164. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:117
  165. #, no-wrap
  166. msgid ""
  167. "<userinput>cat &gt; /etc/group &lt;&lt; \"EOF\"\n"
  168. "<literal>root:x:0:\n"
  169. "bin:x:1:daemon\n"
  170. "sys:x:2:\n"
  171. "kmem:x:3:\n"
  172. "tape:x:4:\n"
  173. "tty:x:5:\n"
  174. "daemon:x:6:\n"
  175. "floppy:x:7:\n"
  176. "disk:x:8:\n"
  177. "lp:x:9:\n"
  178. "dialout:x:10:\n"
  179. "audio:x:11:\n"
  180. "video:x:12:\n"
  181. "utmp:x:13:\n"
  182. "usb:x:14:\n"
  183. "cdrom:x:15:\n"
  184. "adm:x:16:\n"
  185. "messagebus:x:18:\n"
  186. "systemd-journal:x:23:\n"
  187. "input:x:24:\n"
  188. "mail:x:34:\n"
  189. "kvm:x:61:\n"
  190. "systemd-bus-proxy:x:72:\n"
  191. "systemd-journal-gateway:x:73:\n"
  192. "systemd-journal-remote:x:74:\n"
  193. "systemd-journal-upload:x:75:\n"
  194. "systemd-network:x:76:\n"
  195. "systemd-resolve:x:77:\n"
  196. "systemd-timesync:x:78:\n"
  197. "systemd-coredump:x:79:\n"
  198. "wheel:x:97:\n"
  199. "nogroup:x:99:\n"
  200. "users:x:999:</literal>\n"
  201. "EOF</userinput>"
  202. msgstr ""
  203. #. type: Content of: <sect1><para>
  204. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:153
  205. msgid ""
  206. "The created groups are not part of any standard&mdash;they are groups "
  207. "decided on in part by the requirements of the Udev configuration in Chapter "
  208. "9, and in part by common convention employed by a number of existing Linux "
  209. "distributions. In addition, some test suites rely on specific users or "
  210. "groups. The Linux Standard Base (LSB, available at <ulink "
  211. "url=\"http://refspecs.linuxfoundation.org/lsb.shtml\"/>) only recommends "
  212. "that, besides the group <systemitem class=\"groupname\">root</systemitem> "
  213. "with a Group ID (GID) of 0, a group <systemitem "
  214. "class=\"groupname\">bin</systemitem> with a GID of 1 be present. All other "
  215. "group names and GIDs can be chosen freely by the system administrator since "
  216. "well-written programs do not depend on GID numbers, but rather use the "
  217. "group's name."
  218. msgstr ""
  219. #. type: Content of: <sect1><para>
  220. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:165
  221. msgid ""
  222. "Some tests in <xref linkend=\"chapter-building-system\"/> need a regular "
  223. "user. We add this user here and delete this account at the end of that "
  224. "chapter."
  225. msgstr ""
  226. #. type: Content of: <sect1><screen>
  227. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:169
  228. #, no-wrap
  229. msgid ""
  230. "<userinput>echo \"tester:x:$(ls -n $(tty) | cut -d\" \" "
  231. "-f3):101::/home/tester:/bin/bash\" &gt;&gt; /etc/passwd\n"
  232. "echo \"tester:x:101:\" &gt;&gt; /etc/group\n"
  233. "install -o tester -d /home/tester</userinput>"
  234. msgstr ""
  235. #. type: Content of: <sect1><para>
  236. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:173
  237. msgid ""
  238. "To remove the <quote>I have no name!</quote> prompt, start a new "
  239. "shell. Since the <filename>/etc/passwd</filename> and "
  240. "<filename>/etc/group</filename> files have been created, user name and group "
  241. "name resolution will now work:"
  242. msgstr ""
  243. #. type: Content of: <sect1><screen>
  244. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:179
  245. #, no-wrap
  246. msgid "<userinput>exec /bin/bash --login +h</userinput>"
  247. msgstr ""
  248. #. type: Content of: <sect1><para>
  249. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:181
  250. msgid ""
  251. "Note the use of the <parameter>+h</parameter> directive. This tells "
  252. "<command>bash</command> not to use its internal path hashing. Without this "
  253. "directive, <command>bash</command> would remember the paths to binaries it "
  254. "has executed. To ensure the use of the newly compiled binaries as soon as "
  255. "they are installed, the <parameter>+h</parameter> directive will be used for "
  256. "the duration of this and the next chapter."
  257. msgstr ""
  258. #. type: Content of: <sect1><para>
  259. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:188
  260. msgid ""
  261. "The <command>login</command>, <command>agetty</command>, and "
  262. "<command>init</command> programs (and others) use a number of log files to "
  263. "record information such as who was logged into the system and when. However, "
  264. "these programs will not write to the log files if they do not already "
  265. "exist. Initialize the log files and give them proper permissions:"
  266. msgstr ""
  267. #. type: Content of: <sect1><screen>
  268. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:195
  269. #, no-wrap
  270. msgid ""
  271. "<userinput>touch /var/log/{btmp,lastlog,faillog,wtmp}\n"
  272. "chgrp -v utmp /var/log/lastlog\n"
  273. "chmod -v 664 /var/log/lastlog\n"
  274. "chmod -v 600 /var/log/btmp</userinput>"
  275. msgstr ""
  276. #. type: Content of: <sect1><para>
  277. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:200
  278. msgid ""
  279. "The <filename>/var/log/wtmp</filename> file records all logins and "
  280. "logouts. The <filename>/var/log/lastlog</filename> file records when each "
  281. "user last logged in. The <filename>/var/log/faillog</filename> file records "
  282. "failed login attempts. The <filename>/var/log/btmp</filename> file records "
  283. "the bad login attempts."
  284. msgstr ""
  285. #. type: Content of: <sect1><note><para>
  286. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/createfiles.xml:206
  287. msgid ""
  288. "The <filename>/run/utmp</filename> file records the users that are currently "
  289. "logged in. This file is created dynamically in the boot scripts."
  290. msgstr ""