2001-01-24 00:31:17 +00:00
|
|
|
<sect1 id="ch05-pwdgroup">
|
|
|
|
<title>Creating passwd and group files</title>
|
2001-09-26 00:55:44 +01:00
|
|
|
<?dbhtml filename="pwdgroup.html" dir="chapter05"?>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>In order for the user and group root to be recognized and to be able to
|
|
|
|
login, there needs to be an entry in the /etc/passwd and /etc/group file.
|
2001-08-29 18:49:48 +01:00
|
|
|
Besides the group root, a couple of other groups are recommended and needed by
|
2002-04-19 19:57:36 +01:00
|
|
|
packages. The groups created below aren't part of any standard.
|
2002-01-25 16:09:36 +00:00
|
|
|
The LSB only recommends a group bin with GID 1 to be present besides
|
|
|
|
group root. Other group names and GID's can be chosen by the user. Well
|
2001-01-24 00:31:17 +00:00
|
|
|
written packages don't depend on GID numbers but just use the group
|
2002-01-25 16:09:36 +00:00
|
|
|
name, so it doesn't matter which GID a group has. Since there
|
|
|
|
aren't any standards for groups the groups created here are the groups the
|
2001-01-24 00:31:17 +00:00
|
|
|
MAKEDEV script (the script that creates the device files in the /dev
|
2001-07-22 20:45:10 +01:00
|
|
|
directory) mentions.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Create a new file <filename>$LFS/etc/passwd</filename> by running the
|
|
|
|
following command:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" > $LFS/etc/passwd</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Create a new file <filename>$LFS/etc/group</filename> by running the
|
2002-01-25 16:09:36 +00:00
|
|
|
following command:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para><screen><userinput>cat > $LFS/etc/group << "EOF"</userinput>
|
2001-07-06 16:25:48 +01:00
|
|
|
root:x:0:
|
|
|
|
bin:x:1:
|
|
|
|
sys:x:2:
|
|
|
|
kmem:x:3:
|
|
|
|
tty:x:4:
|
|
|
|
tape:x:5:
|
|
|
|
daemon:x:6:
|
|
|
|
floppy:x:7:
|
|
|
|
disk:x:8:
|
|
|
|
lp:x:9:
|
|
|
|
dialout:x:10:
|
|
|
|
audio:x:11:
|
2001-07-22 20:45:10 +01:00
|
|
|
<userinput>EOF</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|