blob: bf2f0315d699db1fb359ba6a5b97c2c8c1262ea4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<sect1 id="ch06-pwdgroup">
<title>Creating passwd and group files</title>
<?dbhtml filename="pwdgroup.html" dir="chapter06"?>
<para>In order for the user and the group "root" to be recognized and to be
able to login, there need to be entries in the /etc/passwd and /etc/group file.
Besides the group "root", a couple of other groups are recommended or needed
by some packages. The groups created below aren't part of any standard.
The LSB only recommends a group "bin" with GID 1 to be present besides
"root". Other group names and GIDs can be chosen by the user.
Well-written packages don't depend on GID numbers, but use the group's
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
MAKEDEV script (the script that creates the device files in the /dev
directory) mentions.</para>
<para>Create a new file <filename>/etc/passwd</filename> by running the
following command:</para>
<para><screen><userinput>echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd</userinput></screen></para>
<para>Create a new file <filename>/etc/group</filename> by running the
following command:</para>
<para><screen><userinput>cat > /etc/group << "EOF"</userinput>
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:
<userinput>EOF</userinput></screen></para>
</sect1>
|