2004-05-03 11:59:46 +01:00
|
|
|
<?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">
|
2004-07-14 18:58:05 +01:00
|
|
|
<title>The passwd, group and log files</title>
|
2004-05-03 11:59:46 +01:00
|
|
|
<?dbhtml filename="pwdgroup.html"?>
|
|
|
|
|
2004-12-21 19:38:32 +00:00
|
|
|
<para>Create the <filename>/etc/passwd</filename> file:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-06-19 14:39:28 +01:00
|
|
|
<screen><userinput>cat > /etc/passwd << "EOF"
|
2004-05-03 11:59:46 +01:00
|
|
|
root:x:0:0:root:/root:/bin/bash
|
2004-06-19 14:39:28 +01:00
|
|
|
EOF</userinput></screen>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-12-21 19:38:32 +00:00
|
|
|
<para>Create the <filename>/etc/group</filename> file:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-06-19 14:39:28 +01:00
|
|
|
<screen><userinput>cat > /etc/group << "EOF"
|
2004-05-03 11:59:46 +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:
|
2004-05-03 22:28:58 +01:00
|
|
|
video:x:12:
|
2004-05-05 00:22:10 +01:00
|
|
|
utmp:x:13:
|
2004-05-20 17:32:44 +01:00
|
|
|
usb:x:14:
|
2004-06-19 14:39:28 +01:00
|
|
|
EOF</userinput></screen>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2004-12-21 19:38:32 +00:00
|
|
|
<para>Start a new shell:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
|
|
|
|
|
2004-12-21 19:38:32 +00:00
|
|
|
<para>Initialize the log files and give them their proper permissions:</para>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
|
2004-05-05 00:22:10 +01:00
|
|
|
chgrp utmp /var/run/utmp /var/log/lastlog
|
|
|
|
chmod 664 /var/run/utmp /var/log/lastlog</userinput></screen>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect1>
|