Changeset ef13657 for chapter06/pwdgroup.xml
- Timestamp:
- 08/08/2004 02:11:09 AM (20 years ago)
- Branches:
- 6.0
- Children:
- 5ba3d1d
- Parents:
- 6e41459
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/pwdgroup.xml
r6e41459 ref13657 15 15 <indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary></indexterm> 16 16 17 <para>In order for <emphasis>root</emphasis> to be able to login and for the18 name <quote>root</quote> to be recognized, there need to be relevant entries in 19 the <filename>/etc/passwd</filename> and <filename>/etc/group</filename> files. 20 < /para>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 21 22 22 <para>Create the <filename>/etc/passwd</filename> file by running the following … … 28 28 29 29 <para>The actual password for <emphasis>root</emphasis> (the <quote>x</quote> 30 here is just a placeholder) will be set later.</para>30 used here is just a placeholder) will be set later.</para> 31 31 32 32 <para>Create the <filename>/etc/group</filename> file by running the following … … 51 51 EOF</userinput></screen> 52 52 53 <para>The created groups aren't part of any standard -- they are some of the 54 groups that the Udev configuration we will be using in the next section 55 uses. The LSB (<ulink url="http://www.linuxbase.org/">Linux Standard 56 Base</ulink>) recommends only that, beside the group <quote>root</quote> with a 57 GID of 0, a group <quote>bin</quote> with a GID of 1 be present. All other group 58 names and GIDs can be chosen freely by the system administrator, since 59 well-written packages don't depend on GID numbers but use the group's name. 60 </para> 53 <para>The created groups are not part of any standard -- they are some 54 of the groups that the Udev configuration we 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> 61 62 62 <para>To get rid of the <quote>I have no name!</quote> prompt, we will start a 63 new shell. Since we installed a full Glibc in 64 <xref linkend="chapter-temporary-tools"/>, and have just created the 65 <filename>/etc/passwd</filename> and <filename>/etc/group</filename> files, 66 user name and group name resolution will now work.</para> 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> 67 69 68 70 <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen> 69 71 70 <para>Note the use of the <parameter>+h</parameter> directive. This tells71 <command>bash</command> not to use its internal path hashing. Without this 72 directive, <command>bash</command> would remember the paths to binaries it 73 has executed. Since we want to use our newly compiled binaries as soon as 74 they are installed, we turn off this function for the duration of this 75 chapter.</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> 76 78 77 79 <para>The <command>login</command>, <command>agetty</command> and 78 <command>init</command> programs (and some others) use a number of log 79 files to record information such as who was logged into the system and when. 80 These programs, however, won't write to the log files if they don't already 81 exist. Initialize the log files and give them their proper permissions:</para> 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 their 84 proper permissions:</para> 82 85 83 86 <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} … … 85 88 chmod 664 /var/run/utmp /var/log/lastlog</userinput></screen> 86 89 87 <para>The <filename>/var/run/utmp</filename> file records the users that are 88 currently logged in. The <filename>/var/log/wtmp</filename> file records all 89 logins and logouts. The <filename>/var/log/lastlog</filename> file records for 90 each user when he or she last logged in. The <filename>/var/log/btmp</filename> 91 file records the bad login attempts.</para> 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 for each user when 94 he or she last logged in. The <filename>/var/log/btmp</filename> file 95 records the bad login attempts.</para> 92 96 93 97 </sect1> 98
Note:
See TracChangeset
for help on using the changeset viewer.