Index: BOOK/boot/common/changingowner.xml
===================================================================
--- BOOK/boot/common/changingowner.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/boot/common/changingowner.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -19,5 +19,12 @@
   for ${CLFS} and its subdirectories by running this command:</para>
 
-<screen os="b"><userinput>chown -Rv root:root ${CLFS}</userinput></screen>
+<screen os="b"><userinput>chown -Rv &uid-root;:&gid-root; ${CLFS}</userinput></screen>
+
+  <para>The following files are to be owned by the group
+  <systemitem class="username">utmp</systemitem> not by
+  <systemitem class="username">root</systemitem>.</para>
+
+<screen><userinput>chgrp -v &gid-utmp; ${CLFS}/var/run/utmp ${CLFS}/var/log/lastlog</userinput></screen>
+
 
 </sect1>
Index: BOOK/boot/common/fstab.xml
===================================================================
--- BOOK/boot/common/fstab.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/boot/common/fstab.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -30,5 +30,5 @@
 proc           /proc        proc   defaults         0     0
 sysfs          /sys         sysfs  defaults         0     0
-devpts         /dev/pts     devpts gid=4,mode=620   0     0
+devpts         /dev/pts     devpts gid=&gid-tty;,mode=620   0     0
 shm            /dev/shm     tmpfs  defaults         0     0
 # End /etc/fstab</literal>
Index: BOOK/boot/common/pwdgroup.xml
===================================================================
--- BOOK/boot/common/pwdgroup.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/boot/common/pwdgroup.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -44,5 +44,5 @@
 
 <screen><userinput>cat &gt; ${CLFS}/etc/passwd &lt;&lt; "EOF"
-<literal>root::0:0:root:/root:/bin/bash</literal>
+<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
 EOF</userinput></screen>
 
@@ -56,5 +56,5 @@
 
     <varlistentry>
-      <term><literal>bin:x:1:1:bin:/bin:/bin/false</literal></term>
+      <term><literal>bin:x:&uid-bin;:&gid-bin;:bin:/bin:/bin/false</literal></term>
       <listitem>
         <para>Can be useful for compatibility with legacy applications.</para>
@@ -62,5 +62,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>daemon:x:2:6:daemon:/sbin:/bin/false</literal></term>
+      <term><literal>daemon:x:&uid-daemon;:&gid-daemon;:daemon:/sbin:/bin/false</literal></term>
       <listitem>
         <para>It is often recommended to use an unprivileged User ID/Group ID
@@ -69,5 +69,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>adm:x:3:16:adm:/var/adm:/bin/false</literal></term>
+      <term><literal>adm:x:&uid-adm;:&gid-adm;:adm:/var/adm:/bin/false</literal></term>
       <listitem>
         <para>Was used for programs that performed administrative tasks.</para>
@@ -75,5 +75,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>lp:x:10:9:lp:/var/spool/lp:/bin/false</literal></term>
+      <term><literal>lp:x:&uid-lp;:&gid-lp;:lp:/var/spool/lp:/bin/false</literal></term>
       <listitem>
         <para>Used by programs for printing</para>
@@ -81,5 +81,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>mail:x:30:30:mail:/var/mail:/bin/false</literal></term>
+      <term><literal>mail:x:&uid-mail;:&gid-mail;:mail:/var/mail:/bin/false</literal></term>
       <listitem>
         <para>Often used by email programs</para>
@@ -87,5 +87,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>news:x:31:31:news:/var/spool/news:/bin/false</literal></term>
+      <term><literal>news:x:&uid-news;:&gid-news;:news:/var/spool/news:/bin/false</literal></term>
       <listitem>
         <para>Often used for network news servers</para>
@@ -93,5 +93,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>operator:x:50:0:operator:/root:/bin/bash</literal></term>
+      <term><literal>operator:x:&uid-operator;:&gid-root;:operator:/root:/bin/bash</literal></term>
       <listitem>
         <para>Often used to allow system operators to access the system</para>
@@ -99,5 +99,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>postmaster:x:51:30:postmaster:/var/spool/mail:/bin/false</literal></term>
+      <term><literal>postmaster:x:&uid-postmaster;:&gid-mail;:postmaster:/var/spool/mail:/bin/false</literal></term>
       <listitem>
         <para>Generally used as an account that receives all the information of troubles with the mail server</para>
@@ -105,5 +105,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>nobody:x:65534:65534:nobody:/:/bin/false</literal></term>
+      <term><literal>nobody:x:&uid-nobody;:&gid-nobody;:nobody:/:/bin/false</literal></term>
       <listitem>
         <para>Used by NFS</para>
@@ -117,19 +117,19 @@
 <screen><userinput>cat &gt; ${CLFS}/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:
-cdrom:x:15:</literal>
+bin:x:&gid-bin;:
+sys:x:&gid-sys;:
+kmem:x:&gid-kmem;:
+tty:x:&gid-tty;:
+tape:x:&gid-tape;:
+daemon:x:&gid-daemon;:
+floppy:x:&gid-floppy;:
+disk:x:&gid-disk;:
+lp:x:&gid-lp;:
+dialout:x:&gid-dialout;:
+audio:x:&gid-audio;:
+video:x:&gid-video;:
+utmp:x:&gid-utmp;:
+usb:x:&gid-usb;:
+cdrom:x:&gid-cdrom;:</literal>
 EOF</userinput></screen>
 
@@ -139,5 +139,5 @@
 
     <varlistentry>
-      <term><literal>adm:x:16:root,adm,daemon</literal></term>
+      <term><literal>adm:x:&gid-adm;:root,adm,daemon</literal></term>
       <listitem>
         <para>All users in this group are allowed to do administrative tasks</para>
@@ -145,5 +145,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>console:x:17:</literal></term>
+      <term><literal>console:x:&gid-console;:</literal></term>
       <listitem>
         <para>This group has direct access to the console</para>
@@ -151,5 +151,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>cdrw:x:18:</literal></term>
+      <term><literal>cdrw:x:&gid-cdrw;:</literal></term>
       <listitem>
         <para>This group is allowed to use the CDRW drive</para>
@@ -157,5 +157,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>mail:x:30:mail</literal></term>
+      <term><literal>mail:x:&gid-mail;:mail</literal></term>
       <listitem>
         <para>Used by MTAs (Mail Transport Agents)</para>
@@ -163,5 +163,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>news:x:31:news</literal></term>
+      <term><literal>news:x:&gid-news;:news</literal></term>
       <listitem>
         <para>Used by Network News Servers</para>
@@ -169,5 +169,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>users:x:1000:</literal></term>
+      <term><literal>users:x:&gid-users;:</literal></term>
       <listitem>
         <para>The default GID used by shadow for new users</para>
@@ -175,5 +175,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>nogroup:x:65533:</literal></term>
+      <term><literal>nogroup:x:&gid-nogroup;:</literal></term>
       <listitem>
         <para>This is a default group used by some programs that do not
@@ -182,5 +182,5 @@
     </varlistentry>
     <varlistentry>
-      <term><literal>nobody:x:65534:</literal></term>
+      <term><literal>nobody:x:&gid-nobody;:</literal></term>
       <listitem>
         <para>This is used by NFS</para>
Index: BOOK/bootable/common/fstab.xml
===================================================================
--- BOOK/bootable/common/fstab.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/bootable/common/fstab.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -30,5 +30,5 @@
 proc           /proc        proc   defaults         0     0
 sysfs          /sys         sysfs  defaults         0     0
-devpts         /dev/pts     devpts gid=4,mode=620   0     0
+devpts         /dev/pts     devpts gid=&gid-tty;,mode=620   0     0
 shm            /dev/shm     tmpfs  defaults         0     0
 # End /etc/fstab</literal>
Index: BOOK/chroot/common/devices.xml
===================================================================
--- BOOK/chroot/common/devices.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/chroot/common/devices.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -21,5 +21,5 @@
     newly-created directories:</para>
 
-<screen><userinput>mount -vt devpts -o gid=4,mode=620 none /dev/pts
+<screen><userinput>mount -vt devpts -o gid=&gid-tty;,mode=620 none /dev/pts
 mount -vt tmpfs none /dev/shm</userinput></screen>
 
Index: BOOK/chroot/common/kernfs.xml
===================================================================
--- BOOK/chroot/common/kernfs.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/chroot/common/kernfs.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -55,5 +55,5 @@
 
 <screen><userinput>mount -f -vt tmpfs tmpfs ${CLFS}/dev/shm
-mount -f -vt devpts -o gid=4,mode=620 devpts ${CLFS}/dev/pts</userinput></screen>
+mount -f -vt devpts -o gid=&gid-tty;,mode=620 devpts ${CLFS}/dev/pts</userinput></screen>
 
 </sect1>
Index: BOOK/chroot/common/pwdgroup.xml
===================================================================
--- BOOK/chroot/common/pwdgroup.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/chroot/common/pwdgroup.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -43,5 +43,5 @@
 
 <screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
-<literal>root:x:0:0:root:/root:/bin/bash</literal>
+<literal>root:x:&uid-root;:&gid-root;:root:/root:/bin/bash</literal>
 EOF</userinput></screen>
 
@@ -59,19 +59,19 @@
 <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:
-cdrom:x:15:</literal>
+bin:x:&gid-bin;:
+sys:x:&gid-sys;:
+kmem:x:&gid-kmem;:
+tty:x:&gid-tty;:
+tape:x:&gid-tape;:
+daemon:x:&gid-daemon;:
+floppy:x:&gid-floppy;:
+disk:x:&gid-disk;:
+lp:x:&gid-lp;:
+dialout:x:&gid-dialout;:
+audio:x:&gid-audio;:
+video:x:&gid-video;:
+utmp:x:&gid-utmp;:
+usb:x:&gid-usb;:
+cdrom:x:&gid-cdrom;:</literal>
 EOF</userinput></screen>
 
Index: BOOK/general.ent
===================================================================
--- BOOK/general.ent	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/general.ent	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -57,2 +57,5 @@
 <!ENTITY % patches-entities SYSTEM "patches.ent">
 %patches-entities;
+
+<!ENTITY % uid-gid-entities SYSTEM "users_groups.ent">
+%uid-gid-entities;
Index: BOOK/introduction/common/changelog.xml
===================================================================
--- BOOK/introduction/common/changelog.xml	(revision 34be04a6cab56e5abf0198256fbbb5f8c056c7f6)
+++ BOOK/introduction/common/changelog.xml	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -40,4 +40,7 @@
       <para>August 08, 2010</para>
       <itemizedlist>
+        <listitem>
+          <para>[jciccone] - Migrated the UID and GID Map from Sysroot.</para>
+        </listitem>
         <listitem>
           <para>[jciccone] - Removed Lilo and bin86 from x86_64-64 in favor
Index: BOOK/users_groups.ent
===================================================================
--- BOOK/users_groups.ent	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
+++ BOOK/users_groups.ent	(revision 8f1ae86d73fbe57497e46d5836eb4aeaaff4431c)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!-- User IDs for use throught the book -->
+
+<!ENTITY uid-root "0">
+<!ENTITY uid-bin "1">
+<!ENTITY uid-daemon "2">
+<!ENTITY uid-adm "3">
+<!ENTITY uid-lp "10">
+<!ENTITY uid-mail "30">
+<!ENTITY uid-news "31">
+<!ENTITY uid-operator "50">
+<!ENTITY uid-postmaster "51">
+<!ENTITY uid-nobody "65534">
+
+<!-- Group IDs for use throught the book -->
+
+<!ENTITY gid-root "0">
+<!ENTITY gid-bin "1">
+<!ENTITY gid-sys "2">
+<!ENTITY gid-kmem "3">
+<!ENTITY gid-tty "4">
+<!ENTITY gid-tape "5">
+<!ENTITY gid-daemon "6">
+<!ENTITY gid-floppy "7">
+<!ENTITY gid-disk "8">
+<!ENTITY gid-lp "9">
+<!ENTITY gid-dialout "10">
+<!ENTITY gid-audio "11">
+<!ENTITY gid-video "12">
+<!ENTITY gid-utmp "13">
+<!ENTITY gid-usb "14">
+<!ENTITY gid-cdrom "15">
+<!ENTITY gid-adm "16">
+<!ENTITY gid-console "17">
+<!ENTITY gid-cdrw "18">
+<!ENTITY gid-mail "30">
+<!ENTITY gid-news "31">
+<!ENTITY gid-users "1000">
+<!ENTITY gid-nogroup "65533">
+<!ENTITY gid-nobody "65534">
