|
GNU/Linux Desktop Survival Guide by Graham Williams |
|
|||
Account Configuration |
The first task is to set up the system so that our normal user login
account (in this case called kayon), can perform various
administrative tasks. First log in as the super user (i.e., the
root user account), and install the Debian package manager
called wajig:
$ su Password: # apt-get install wajig |
Whilst logged in as root, we need to set up the sudo
package. ``sudo'' means ``super user do'' and is how we can let normal
users do super user, or root, administrative tasks, without logging in
as the super user all the time. As the super user (i.e., logging in
as root) use the visudo command to start up an
editor that will allow us to set up wajig
usage for a user
by adding the following lines in the appropriate (and obvious) places
within the file (replace kayon with the user account name you
created):
Cmnd_Alias APT = /usr/bin/apt-get, /usr/bin/apt-cache, /usr/bin/dpkg, \
/usr/sbin/dpkg-reconfigure, /usr/bin/dpkg-repack, \
/etc/init.d/*, /usr/sbin/update-alternatives, \
/usr/lib/apt-move/fetch, /usr/bin/dselect, \
/usr/bin/alien, /usr/sbin/apt-setup, \
/usr/sbin/invoke-rc.d
kayon ALL=(ALL) APT
|
We now exit from the editor and then from the super user account and go back to our own user login account.
Next, set up a basic system with a number of standard packages including ssh, emacs21, less, most, zile, sudo:
$ wajig install ssh emacs21 most zile |
These packages will be installed from the DVDs we used to install the system.
If we have our computer connected to the Internet the we can access a
Debian archive. To do so we might edit the archive sources file to add
a line for a particular archive. Note that here we are adding access
to the so called unstable distribution. You may not want to do this
unless you feel comfortable with exploring! For the stable release,
replace unstable with stable. Also, you might find that the
appropriate line is already listed in the file--in which case you
don;t need to do anything.
$ wajig editsources Add something like the following line: deb http://ftp.debian.org/debian unstable main contrib non-free $ wajig update |
We may get some messages about signatures that could not be verified because the public key was not available. This can be fixed by obtaining the appropriate key as discussed in Section 6.10.3.
Now do an upgrade to the unstable release (or to the latest stable
release if that is what we chose). Use the upgrade option
first, to avoid removing packages that we may not want to remove:
# wajig upgrade |
We can carefully fully upgrade to the unstable distribution with the
following, but keep an eye on what is to be removed to make sure key
packages don't disappear (sometimes there are transient problems with
the unstable release):
# wajig distupgrade |
If we have a network of computers and want to connect between them
using ssh, then we may want to set up, for the user account, ssh for
access to the remote accounts, to avoid repeatedly typing a
password. In the following, replace athene (
) with the name of
one of your other computers and replace kayon with your user
login account name:
$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key
(/home/kayon/.ssh/id_dsa):
...accept the default file location by pressing <Enter>
Enter passphrase (empty for no passphrase):
...enter a pass phrase - not too long
Enter same passphrase again:
Your identification has been saved in /home/kayon/.ssh/id_dsa
Your public key has been saved in /home/kayon/.ssh/id_dsa.pub.
The key fingerprint is:
f5:41:12:56:e4:a4:12:a5:91:a4:58:48:84:6f:b1:16 kayon@togaware
$ scp .ssh/id_dsa.pub athene:.ssh/id_dsa.new
$ ssh athene
$ cd .ssh; cat id_dsa.new >> authorized_keys
$ ssh-agent bash
$ ssh-add
Enter passphrase for /home/kayon/.ssh/id_dsa:
Identity added: /home/kayon/.ssh/id_dsa (/home/kayon/.ssh/id_dsa)
|
Now copy setup files from remote hosts (assuming you have some to
copy--the host athene (
) is simply a computer I can access but
you won't be able to and you can skip this step):
$ scp athene:{.bashrc,.bash_profile,.emacs,.emacs-custom,.emacs-kayon} .
$ scp athene:{.xsession,.Xresources} .
|
Copyright © 1995-2008 Togaware Pty Ltd