<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">

<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->

<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-finalise.xml,v 1.35 2004/11/15 12:47:47 swift Exp $ -->

<sections>

<version>1.33</version>
<date>November 2, 2004</date>

<section>
<title>User Administration</title>
<subsection>
<title>Adding a User for Daily Use</title>
<body>

<p>
Working as root on a Unix/Linux system is <e>dangerous</e> and should be avoided
as much as possible. Therefore it is <e>strongly</e> recommended to add a user 
for day-to-day use.
</p>

<p>
The groups the user is member of define what activities the user can perform.
The following table lists a number of important groups you might wish to use:
</p>

<table>
<tr>
  <th>Group</th>
  <th>Description</th>
</tr>
<tr>
  <ti>audio</ti>
  <ti>be able to access the audio devices</ti>
</tr>
<tr>
  <ti>cdrom</ti>
  <ti>be able to access cdrom devices</ti>
</tr>
<tr>
  <ti>floppy</ti>
  <ti>be able to access floppy devices</ti>
</tr>
<tr>
  <ti>games</ti>
  <ti>be able to play games</ti>
</tr>
<tr>
  <ti>usb</ti>
  <ti>be able to access USB devices</ti>
</tr>
<tr>
  <ti>video</ti>
  <ti>
    be able to access video capturing hardware and doing hardware
    acceleration
  </ti>
</tr>
<tr>
  <ti>wheel</ti>
  <ti>be able to use <c>su</c></ti>
</tr>
</table>

<p>
For instance, to create a user called <c>john</c> who is member of the
<c>wheel</c>, <c>users</c> and <c>audio</c> groups, log in as root first 
(only root can create users) and run <c>useradd</c>:
</p>

<pre caption="Adding a user for day-to-day use">
Login: <i>root</i>
Password: <comment>(Your root password)</comment>

# <i>useradd -m -G users,wheel,audio,tty -s /bin/bash john</i>
# <i>passwd john</i>
Password: <comment>(Enter the password for john)</comment>
Re-enter password: <comment>(Re-enter the password to verify)</comment>
</pre>

<p>
If a user ever needs to perform some task as root, they can use <c>su -</c>
to temporarily receive root privileges. Another way is to use the <c>sudo</c> 
package which is, if correctly configured, very secure.
</p>

</body>
</subsection>
</section>
<section>
<title>Optional: Install GRP Packages</title>
<body>

<impo>
This part is for GRP users only. Other users should skip this part and continue
with <uri link="?part=1&amp;chap=12">Where to go from here?</uri>.
</impo>

<p>
Now that your system is booted, log on as the user you created (for instance,
<c>john</c>) and use <c>su -</c> to gain root privileges:
</p>

<pre caption="Gaining root privileges">
$ <i>su -</i>
Password: <comment>(Enter your root password)</comment>
</pre>

<p>
Now we need to change the Portage configuration to look for the prebuilt 
binaries from the second CD (Gentoo Packages CD). First mount this CD:
</p>

<pre caption="Mount the Packages CD">
<comment>(Put the Gentoo Packages CD in the CD tray)</comment>
# <i>mount /mnt/cdrom</i>
</pre>

<p>
Now configure Portage to use <path>/mnt/cdrom</path> for its prebuilt packages:
</p>

<pre caption="Configuring Portage to use /mnt/cdrom">
# <i>ls /mnt/cdrom</i>

<comment>(If there is a /mnt/cdrom/packages directory:)</comment>
# <i>export PKGDIR="/mnt/cdrom/packages"</i>

<comment>(Otherwise:)</comment>
# <i>export PKGDIR="/mnt/cdrom"</i>
</pre>

<p>
Now install the packages you want. The Packages CD contains several prebuilt 
binaries, for instance KDE:
</p>

<pre caption="Installing KDE">
# <i>emerge --usepkg kde</i>
</pre>

<p>
Be sure to install the binaries now. When you do an <c>emerge --sync</c> to
update Portage (as you will learn later), the prebuilt binaries might not match
against the ebuilds in your updated Portage. You can try to circumvent this by
using <c>emerge --usepkgonly</c> instead of <c>emerge --usepkg</c>.
</p>

<p>
Congratulations, your system is now fully equiped! Continue with <uri
link="?part=1&amp;chap=12">Where to go from here?</uri> to learn more about
Gentoo.
</p>

</body>
</section>
</sections>
