Changeset 81fd230 for chapter06/pwdgroup.xml
- Timestamp:
- 02/19/2005 10:16:42 PM (19 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 3d31fc4
- Parents:
- 2f9131f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/pwdgroup.xml
r2f9131f r81fd230 8 8 <?dbhtml filename="pwdgroup.html"?> 9 9 10 <para>Create the <filename>/etc/passwd</filename> file:</para> 10 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/passwd">/etc/passwd</primary></indexterm> 11 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/group">/etc/group</primary></indexterm> 12 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/run/utmp">/var/run/utmp</primary></indexterm> 13 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/btmp">/var/log/btmp</primary></indexterm> 14 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary></indexterm> 15 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary></indexterm> 16 17 <para>In order for user <emphasis>root</emphasis> to be able to login 18 and for the name <quote>root</quote> to be recognized, there need to 19 be relevant entries in the <filename>/etc/passwd</filename> and 20 <filename>/etc/group</filename> files.</para> 21 22 <para>Create the <filename>/etc/passwd</filename> file by running the following 23 command:</para> 11 24 12 25 <screen><userinput>cat > /etc/passwd << "EOF" … … 14 27 EOF</userinput></screen> 15 28 16 <para>Create the <filename>/etc/group</filename> file:</para> 29 <para>The actual password for <emphasis>root</emphasis> (the <quote>x</quote> 30 used here is just a placeholder) will be set later.</para> 31 32 <para>Create the <filename>/etc/group</filename> file by running the following 33 command:</para> 17 34 18 35 <screen><userinput>cat > /etc/group << "EOF" … … 34 51 EOF</userinput></screen> 35 52 36 <para>Start a new shell:</para> 53 <para>The created groups are not part of any standard—they are some 54 of the groups that the Udev configuration will be using in the next 55 section. The Linux Standard Base (LSB, available at <ulink 56 url="http://www.linuxbase.org"/>) recommends only that, besides the 57 group <quote>root</quote> with a Group ID (GID) of 0, a group 58 <quote>bin</quote> with a GID of 1 be present. All other group names 59 and GIDs can be chosen freely by the system administrator since 60 well-written packages do not depend on GID numbers, but rather use the 61 group's name.</para> 62 63 <para>To remove the <quote>I have no name!</quote> prompt, start a new 64 shell. Since a full Glibc was installed in <xref 65 linkend="chapter-temporary-tools"/> and the 66 <filename>/etc/passwd</filename> and <filename>/etc/group</filename> 67 files have been created, user name and group name resolution will now 68 work.</para> 37 69 38 70 <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen> 39 71 40 <para>Initialize the log files and give them their proper permissions:</para> 72 <para>Note the use of the <parameter>+h</parameter> directive. This 73 tells <command>bash</command> not to use its internal path hashing. 74 Without this directive, <command>bash</command> would remember the 75 paths to binaries it has executed. In order to use the newly compiled 76 binaries as soon as they are installed, turn off this function for the 77 duration of this chapter.</para> 78 79 <para>The <command>login</command>, <command>agetty</command>, and 80 <command>init</command> programs (and others) use a number of log 81 files to record information such as who was logged into the system and 82 when. However, these programs will not write to the log files if they 83 do not already exist. Initialize the log files and give them 84 proper permissions:</para> 41 85 42 86 <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} … … 44 88 chmod 664 /var/run/utmp /var/log/lastlog</userinput></screen> 45 89 90 <para>The <filename>/var/run/utmp</filename> file records the users 91 that are currently logged in. The <filename>/var/log/wtmp</filename> 92 file records all logins and logouts. The 93 <filename>/var/log/lastlog</filename> file records when 94 each user last logged in. The <filename>/var/log/btmp</filename> file 95 records the bad login attempts.</para> 96 46 97 </sect1> 98
Note:
See TracChangeset
for help on using the changeset viewer.