Home Network Project
RSS icon Email icon Home icon
  • sudoers

    Posted on August 31st, 2009 lance No comments

    Where’s my SUDO?

    Installing different flavors of Linux can be fun and exciting at times.  And it can have you scratching your head.

    Take for instance, my first Linux install was Ubuntu.  Of course, this is a nice intro to anyone new to the Linux game, especially with it’s nice graphical interface.  Now when I looked for help on the net, I was directed to use the SUDO command whenever I needed to issue a command requiring Super User abilities.  This was a nice feature and worked as expected.

    Now even though Ubuntu is a derivitive of Debian, it is not exactly the same.  It apparently came packaged with SUDO, whereas when I went to install Debian, it did not.  Shortly after my install, I attempted to install or configure certain things, and I was given the response that the SUDO command was not found.  I thought I had broken something.  But alas, all was not lost.

    Super User

    Super UserOf course, what SUDO does is issues the command that follows as if you were logged in as Super User.  Now, I had to install SUDO, but without SUDO.  Easy enough.  Just log in as Super User with the “su” command.  Of course, the password you setup for the super user is necessary.

    Once in, no SUDO or anything else is needed to use your godlike skills.  Issue the APTITUDE INSTALL SUDO (or apt-get if you prefer) to install SUDO.  Make sure to exit out of super user when you’re done.

    Now that you’ve got SUDO installed, you may still have trouble, this being due to the fact that you are not on the list of privileged users to issue Super User commands at will.  You must add yourself to the /etc/sudoers file.  Oh darn, you can’t do that without SUDO abilities.  Or can you.  Oh yeah, never should have exited out of Super User mode so quickly.  I guess I did tell you to, did I not?  That’s okay, back in, edit the file with your favorite editor and voila, exit out of Super User again.  We’re done now, I promise.

    While you’re in the sudoers file, find the line that reads # User privilege specification and copy/paste the line below that reads root    ALL=(ALL) ALL and then change root to your name.  You can add other users this way as well, however the more you add, the more problems you invite.  It’s best to reserve this privilege only to those you trust.

  • apt-get or aptitude

    Posted on May 27th, 2009 lance 1 comment

    Installing Software

    When you install software for windows, there is many ways to go about that.  You can have a CD-ROM with the program and install directly from that.  You can download a zip file, extract the files and install the extracted program.  You can download an installer that will then download the necessary files off the net.

    With Linux, there is also a variety of ways.  One of these is using apt-get or aptitude.  You may have seen on the internet instructions on installing some software within debian or ubuntu where someone gave the command apt-get install <program>.  The alternative is to replace apt-get with aptitude.  What’s the difference?

    From the users point of view, there is no difference.  However confirmed reliable sources have brought out the fact that aptitude will handle dependencies much better.

    To quote IRONWALKER from the linuxquestions.org forum:

    Aptitude is said to deal with dependencies better than apt-get. For example, say you install a package which automatically installs some library packages because it depends on them. When you remove this package with apt-get, it won’t remove the libraries this package installed, although they aren’t used anymore.

    When you install that package with aptitude and remove it with aptitude, aptitude ‘detects’ that those library packages aren’t used anymore and will therefore automatically remove them.

    To sum up, aptitude will clean things up when you remove a program.  It will also check to make sure no other program needs the files it wants to remove before doing so.

    The thing to keep in mind is that if you chose to use one over the other, be consistent.

    Graphical Interface

    Synaptic Package Manager

    Synaptic Package Manager

    For those who are running Gnome desktop interface (or KDE), you can use Synaptic.  This nice program will divide up the available programs into categories for you.  You can even search for whatever type of app you are interested in.

    If you prefer to hang out in the CLI, you can issue aptitude by itself on the command line and get this interface.

    aptitude

    aptitude package manager

    It’s fairly easy and similar to the Synaptic Package Manager.  You can search for applications you’re interested in, you can install packages and uninstall them.  Not only can you navigate using your arrow keys on your keyboard, it also responds to your mouse.  Click on the menu above, or an item to the left to open it up.

    This is one sweet app you should familiarize yourself if you like to move around the CLI, especially if you have a system setup without a GUI.

    Of course, if you know the name of an application, you can just command line it and not enter the package manager.  For instance, you can just enter sudo aptitude install <filename>.  If you are unsure if an app exists, or perhaps it’s name, use aptitude search <filename>.    AND, as if that’s not enough, if you know just part of the name, enter that in.

    The following command yields these results:  aptitude search blend

    p   blender                                                     – Very fast and versatile 3D modeller/renderer
    p   blender-ogrexml                                  – Blender Exporter for Ogre
    p   enblend                                                    – Tool for compositing images
    p   kwin-style-blended                             – a window decoration theme for KDE

    Surprise

    If you do bring up the aptitude package manager and find yourself in need of a little time killer, hit Ctrl-T and then P.

    This works on my Debian system, but on my Ubuntu box it drops me back to the command line with the following message: “Ouch!  Got SIGABRT, dying..”   –  Weird.  I’ll have to figure that out another day.

  • Debian installation

    Posted on April 15th, 2009 lance 4 comments

    Cheap Computer

    One of the nice things about LINUX (whatever flavor you desire) is that it does not need the latest and greatest top of the line overclocked hardware to operate.   In fact, for my next project, the server I plan on setting up in VLAN 2 will not have a GUI installed, since it will not have a monitor (nor a need for one, as I will do everything I need to it by logging in via another computer on my network or from the internet).  Without having to display graphics and such, this is alot of overhead the Operating System does not have to deal with, leaving it’s processing power to what it needs to do, in this case, pretty much serve up web pages, and monkey with a database perhaps.

    Home Network

    Craigslist

    Ahhhhh, Craigslist.  The thing I like about Craigslist is that if what I see is not quite adequate, I can look again a few hours later and possibly find what I need.  I found something nice and simple for my needs.   It’s a 100Mhz P3 processor with 512MB of RAM, a 20GB hard drive and a CD-ROM reader.  It has USB ports and a working ethernet port.  Perfect!

    To install Debian, the minimum requirements are

    Pentium 100mhz processor
    16 megabytes of memory
    450 megabytes of hard drive space

    Now these are the minimums to run Debian without the GUI.  If I wanted to install the GUI and use it as a server, this still surpasses the minimum requirements.  So we’ll be just fine.

    Of course to do the install, we do need a monitor, so I  will use what I have.  After the install, the monitor will be removed and re-connected to its original PC.

    Debian

    Now of ALL the different distros of Linux out there, why did I chose Debian?  First, it came highly recommended by someone who is quite knowledgeable in the area of Linux and is one of my greatest sources of all Linux knowledge these days.  But also because of it’s ease of use.

    Lenny from Toy Story

    The more popular Ubuntu is based on Debian.  One of its great features is its ease of installation of programs.  We’ll get into that later.

    The most recent release of Debian is 5.0.1, codename Lenny.  Lenny is named after “Lenny the binoculars” from Toy Story.  In fact all of Debians releases are named after Toy Story characters.  Being a fan of Pixar, I can only say they chose a good theme. 8-)

    Installation

    Now for the installation.  It went very well.  A nice guide with some screen shots of what to expect can be found here.  Keep in mind, that’s just a guide.  For the full manual, you might want to consult this page.

    During installation, you are asked a slew of questions, don’t get intimidated, just plod along.  Probably the biggest hurdle is partitioning the hard drive.  Debian has recommended partition sizes, but this is for the Potato release which is quite a few releases back.  The average memory is larger in todays PCs and larger hard drives.   Everyone has  different suggestions, some of which are due to differing systems, but following the guideline at debian.com can help guide you.

    Choosing your source

    It took me about 4 tries before I had all my partitions setup the way I wanted.  The nice thing is that the installer gives you a chance to review your partition setup before proceeding.

    An important thing to consider is from where you want to get your updates and other apps you intend to install.  If you don’t plan on connecting your PC to the internet, CD-ROM is fine, but you will be limited.  Otherwise make sure you chose HTTP.

    Tweaking

    In order to make changes and tweaks, you’ll need to make sure you can edit/copy/move/delete files as superuser.  Hopefully you remember your ROOT password, you’ll need it.  Log in as root and edit /etc/sudoers with the visudo command (very important) .    Look for this section:

    # User privilege specification
    root    ALL=(ALL) ALL

    Underneath the root user, add your username and copy the line above above it.   Now when you are logged in, you’ll have superuser privileges when you preface each command with SUDO.  You’ll need to enter your password alot.  That’s okay, it’s worth the security.

    Make sure you get an update as well.  The copy you have, may be a tad bit old and newer updates are likely available.  So issue the command sudo aptitude update.  Of course, make sure you’ve got a good connection to the internet.

    If you’re having trouble getting your updates, or if you’re trying to install an app that you know should exist, you may need to edit your /etc/apt/sources.list to the following.

    deb http://ftp.debian.org/debian lenny main
    deb-src http://ftp.debian.org/debian lenny main
    
    deb http://security.debian.org/ lenny/updates main contrib
    deb-src http://security.debian.org/ lenny/updates main contrib
    
    deb http://volatile.debian.org/debian-volatile lenny/volatile main
    deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

    Now if you have a different release other than lenny, make sure you replace lenny in the file with your particular release name.

    Networking

    During installation, I opted out of the DHCP setup for my network interface and setup static IP address because I plan on using static IP addresses for my whole network.  If after installation, you find that your network interface is misconfigured edit it with:

    sudo nano /etc/network/interfaces

    If all goes well, your Linux Box should be up and running.  If you can’t connect to your box remotely, using SSH (I recommend Putty if you’re using a windows machine) to log in, make sure you install OpenSSH server.  You can sudo aptitude install ssh to get both the server and client installed.

    Prior to doing any installation, I recommend reading up on the software as much as you can.  You will definitely have some foreknowledge of what to expect and what information you may need to provide.  Be sure to read the installation guide before installing Debian.

    Extras

    During installation, you will also be asked what packages you want.  I opted out of the GNOME ones since they are for installing the GUI that I did not want.   I did however choose the Web Server.  I can’t remember if it was listed as HTTP, Apache or Web Server.  Nevertheless, that was included and works just fine.  I’ll make another post some day on installing Apache.  Fun.  I might have to uninstall what I’ve got first.  Not fun.


    techno