<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<sect1 id="ch-boot-shadow" role="wrap">
  <?dbhtml filename="shadow.html"?>

  <title>Shadow-&shadow-version;</title>

  <indexterm zone="ch-boot-shadow">
    <primary sortas="a-Shadow">Shadow</primary>
    <secondary>boot</secondary>
  </indexterm>

 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  href="../../final-system/common/shadow.xml"
  xpointer="xpointer(//*[@role='package'])"/>

  <sect2 role="installation">
    <title>Installation of Shadow</title>

    <para os="b">Disable the installation of the <command>groups</command> and
    <command>nologin</command> programs, as better versions
    of these programs are provided by Coreutils and Util-linux:</para>

<screen os="c"><userinput>cp -v src/Makefile.in{,.orig}
sed -e 's/groups$(EXEEXT) //' -e 's/= nologin$(EXEEXT)/= /' \
    src/Makefile.in.orig &gt; src/Makefile.in</userinput></screen>

    <para os="d">Prepare Shadow for compilation:</para>

<screen os="e"><userinput>./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET}</userinput></screen>

    <para os="f">Tell Shadow to use <command>passwd</command> in
    <filename class="directory">/tools/bin</filename>:</para>

<screen os="g"><userinput>cp -v config.h{,.orig}
sed '/PASSWD_PROGRAM/s@/bin/passwd@/tools&amp;@' config.h.orig &gt; config.h</userinput></screen>

    <para os="h">Prevent Shadow from setting installed programs suid:</para>

<screen os="i"><userinput>cp -v src/Makefile{,.orig}
sed 's/\(^suidu*bins = \).*/\1/' src/Makefile.orig &gt; src/Makefile</userinput></screen>

    <para os="j">Compile the package:</para>

<screen os="k"><userinput>make</userinput></screen>

    <para os="l">Install the package:</para>

<screen os="m"><userinput>make install</userinput></screen>

  </sect2>

  <sect2 role="content">
    <title/>

    <para>Details on this package are located in <xref
    linkend="contents-shadow" role="."/></para>
  </sect2>

</sect1>
