Archive for the ‘administration’ Category

Squeeze LXC container in Debian Squeeze

Wednesday, August 31st, 2011

In Debian Squeeze, the default lxc-debian script installs a Lenny container. The bug was reported and fixed in version 0.7.4 of LXC.
To install Squeeze container first download Syd’s version of LXC (currently 0.7.5-1), unpack it and find the lxc-debian file (lxc_0.7.5-1_amd64.deb —> data.tar.gz -> /usr/lib/lxc/templates/lxc-debian). Copy the file to your machine/server, make it executable and in the same folder run:

./lxc-debian -p /var/lib/lxc/name_of_container

Useful resource:
blog.foaa.de/2010/05/lxc-on-debian-squeeze

Setting up Logwatch

Monday, January 31st, 2011

Checking logs is the only way to know what’s happening with your servers and one way to check them is using Logwatch.

Installing it on Debian is easy:
apt-get install logwatch

On my virtual Debian host there was no configuration file in the expected place so I copied it from /usr/share/logwatch/default.conf folder:
cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf/

Things you must change in this file are:

  • Output = mail
  • MailTo = your.mail@example.com
  • Detail = High

The rest is optional and subject to your needs. The logwatch.conf is well documented.

Create folder /var/cache/logwatch needed by logwatch as specified in logwatch.conf.
# mkdir /var/cache/logwatch

Test the setup by running:
# logwatch

To finish the automatism edit the /etc/cron.daily/00logwatch file, removing --mailto: root option to receive mails to the address we specified in logwatch.conf file.

References:

Upgrade Debian over slow Internet connection

Thursday, October 14th, 2010

It was a moderately cold fall evening when I finally decided to do upgrade to Squeeze on my home computer. I have a 2MB line at home, sharing it with two other users. Apt-get dist-upgrade announced two and half hours of downloading at full speed and as it was evening I didn’t want to cut off other users. I have an 1GB optical line straight from my office to one of Debian mirrors, so I’ve decide to do downloading at work.

After short googling I’ve came accross this comment and this manual. The steps below are a combination of both.

  1. At home I’ve run the following command:
    apt-get --print-uris -y dist-upgrade | grep "^'" | gawk '{ print $1 }' | sed "s/'//g" > packages.lst
  2. Sent myself the packages.lst to the office with fast connection and there run the command below in an empty folder on a portable device. You can use -P option to specify the destination folder.
    wget -i packages.lst
  3. Back at home I’ve run:
    apt-get -o dir::cache::archives="/folder/on/portable/disc/" dist-upgrade

Fixing Grub in Debian Rescue Mode

Tuesday, December 15th, 2009

Today Grub experienced a hiccup which left me with crippled Grub rescue mode complaining about “symbol ‘grub_printf_’ not found“. Searching Google gave me just one hit — an German forum page from yesterday bearing no solution yet.

After trying many known things I eventually created a satisfiable solution — bootable system. Not knowing how to fix Grub I decided to downgrade Grub 2 to Grub 1 and the only way to do this is using rescue mode on Debian install disc. The procedure goes as follows:

  • Boot from Debian install disc for architecture you use (i.e. amd64). In the boot menu choose help option as it offers you the option to use the “old-style” command line boot options. The default rescue-mode shell lacks some variables needed for installing/removing packages form the system, so it is useful to start rescue-mode with the following boot option (it enables the user input needed during some instal/remove processes): rescue debian-installer/framebuffer=false
    It is also possible to do this later by running TERM=vt100; export TERM in command-line.
  • Follow the procedure that looks pretty much as installation procedure, but after certain point it offers you the option to choose the partition to use as a root system. At this point it is good if you know which one is it. Next menu lets you enter the command line in which you can alter your system.
  • Using apt-get I first removed the Grub 2 installation (just in case leaving behind configuration files) and then installed the grub-legacy package. After some configuring
    #grub
    grub> find /boot/grub/stage1
    (hd0,1)
    (hd1,0)
    grub>root (hd1,0)
    grub>setup (hd1)
    grub>quit

    and

    #update-grub

    the new “good-old” Grub 1 installation was ready for reboot.

Java plugin on 64 bit Debian

Friday, April 3rd, 2009

Well, finaly I did it. After installing everything I could imagine it might help and trying out all possible solutions I have Java plugin finally working in Iceweasel.

The solution was found on Java bug #4802695 first reported on 14-JAN-2003. The helpful comment #514 made by cava on 14-DEC-2008 said:

It works finally !!! Just need to link java-6-sun-1.6.0.12/jre/lib/amd64/libnpjp2.so in the Firefox plugins directory and we have it !!!!!!!!!!!!!!!!!!!

The command needed was:
ln -s /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/libjavaplugin.so

Flash player for 64 bit Debian

Monday, March 23rd, 2009

Quoting Frederik Kriewitz’s reply on debian-user mailing list:

Download the 64 Bit plugin from
http://labs.adobe.com/downloads/flashplayer10.html
extract it and copy and copy libflashplayer.so to /usr/lib/iceweasel/plugins/

Update (11/25/2009):
The new link to 64-bit version is:
http://labs.adobe.com/technologies/flashplayer10/64bit.html

Synchronizing Google Calendar on Linux

Wednesday, November 5th, 2008

I’ve first done it after reading an Linux.com article and at that time the sync was just one way street – from Google to KDE. As I needed two-way sync I didn’t use it much till today when I remembered to try out the things once more and after a little bit of setup I found it working on KDE’s KOrganizer and Thunderbird‘s extension Lightning

The basic setup layout is presented on Terminally Incoherent blog and extended with links to file-based and HTTP-based installaton on GCALDaemon‘s web page.

UPDATE (24.12.2008)

As Google’s tools are constantly evolving, now there is another option available. To sync Google Calendar with your Thunderbird/Icedove with Lightning extension you can now use CalDAV. The setup is very simple and it also works with Google Apps.

Reblog this post [with Zemanta]

Port scanning with nmap

Thursday, October 23rd, 2008

Nmap is an useful tool for checking the security of a server. Since I don’t use it very often I’ve made a list of useful resources to check when in need.

The first advice, also praised by nmap authors, I got from Trinity from The Matrix Reloaded film.

nmap -v -sS -O 10.2.2.2

-v – verbose output (try -vv for even more verbose)
-sS – “the default and most popular scan option for good reasons”*
-O – OS discovery

Since my server is behind (hope) a good firewall I had to add -P0 option.

nmap portscanner howto

Describing the basic nmap scans

Nmap – Free Security Scanner For Network Exploration & Security Audits

Nmap official page

Nmap reference guide

Nmap manual

Insecure.Org – Nmap Free Security Scanner, Tools & Hacking resources

News and links

Google Earth on 64-bit Debian GNU/Linux

Tuesday, August 12th, 2008
Image representing Google Earth as depicted in...Image via CrunchBase, source unknown

Today I finally decided that it’s about time to try to install Google Earth on my new computer, running an 64-bit version of Debian Testing. I’ve said before and I’ll say it again: “I love Debian!”

First I’ve done a Google search and found solution at SysAdmin’s Diary. Just for my own information I’ll list the steps here, for details take a look at SysAdmin’s Diary blog.

As simple as:

1. Install the googleearth-package

2. Run make-googleearth-package to build the googleearth Debian package

3. See the googleearth_4.3.7284.3916+0.5.4-1_amd64.deb !!! Now, install it.

4. Run googleearth, voila!

If Google Earth complains about error 29 you should also install the lib32nss-mdns package. It might also help to delete the ~/.googleearth folder.

Reblog this post

Internet Explorer on Debian Etch

Tuesday, March 18th, 2008

Source: WikipediaI’ve already wrote about installing IE on Debian, but since then things changed a bit and today I finally succeeded to make it run on my Etch box. While the first time round I installed IE due to web-design issues, this time it was IE-only pages that forced me to search for the solution.

The first and most important step is to fetch the latest-greatest Wine version. The whole process is explained at Wine home page so I’ll mention just the necessary commands:

wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

and

sudo wget http://wine.budgetdedicated.com/apt/soces.list.d/etch.list -O /etc/apt/sources.list.d/winehq.list

Now we can start following the installation procedure described at IEs4Linux web page. Since the procedure mentioned there is for Sarge, I’ll copy the necessary commands below:

apt-get update
apt-get install wine libxxf86dga1 libxxf86vm1 cabextract

and

wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

While this should usually work, I encountered a problem – missing mfc42.cab file. Googling around I found it here and downloaded it into ~/.ies4linux/downloads/ie6/EN-US/ folder.

cd ~/.ies4linux/downloads/ie6/EN-US/
wget http://activex.microsoft.com/controls/vc/mfc42.cab

And after that the install script worked without flaws.