4.18 Account Configuration
Out Of Date
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 install a easier to use package manager for Debian called wajig. On Debian we need to log in as the super user which is the root user account whereas on Ubuntu we use sudo which is arguably a better approach. For Debian:
For Ubuntu it is just:
On Debian we can set up sudo as well. 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. To set this up on Debian, 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, meld, most, emacs and more:
These packages will be installed from the DVD 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.42.
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:
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):
You can always try installing individual packages that are listed for upgrading, and see where the dependencies kick in to remove other packages.
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} .
Copy the same files for root.
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0