aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/pwdgroup.xml
blob: f52de7043b01b4eb9785029b52c15654d26dff76 (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
42
43
44
45
46
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>
<sect1 id="ch-system-pwdgroup">
<title>Creating the passwd, group, and log Files</title>
<?dbhtml filename="pwdgroup.html"?>

<para>Create the <filename>/etc/passwd</filename> file:</para>

<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
<literal>root:x:0:0:root:/root:/bin/bash</literal>
EOF</userinput></screen>

<para>Create the <filename>/etc/group</filename> file:</para>

<screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
<literal>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:
video:x:12:
utmp:x:13:
usb:x:14:</literal>
EOF</userinput></screen>

<para>Start a new shell:</para>

<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>

<para>Initialize the log files and give them their proper permissions:</para>

<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chgrp utmp /var/run/utmp /var/log/lastlog
chmod 664 /var/run/utmp /var/log/lastlog</userinput></screen>

</sect1>