mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 21:17:38 +00:00
3f0c882398
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4446 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
47 lines
1.2 KiB
XML
47 lines
1.2 KiB
XML
<?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>The passwd, group and log files</title>
|
|
<?dbhtml filename="pwdgroup.html"?>
|
|
|
|
<para>Create the <filename>/etc/passwd</filename> file:</para>
|
|
|
|
<screen><userinput>cat > /etc/passwd << "EOF"
|
|
root:x:0:0:root:/root:/bin/bash
|
|
EOF</userinput></screen>
|
|
|
|
<para>Create the <filename>/etc/group</filename> file:</para>
|
|
|
|
<screen><userinput>cat > /etc/group << "EOF"
|
|
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:
|
|
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>
|