Home » 04 October 2009
Access a microsoft windows share from the bash terminal in Ubuntu Linux Desktop

Setup

Ever want to access a windows share from your terminal? Well using ‘ mount ‘ and cifs/samba this is a snap.

Make sure you have smbfs/cifs support, on ubuntu linux distributions you can simply type apt-get install smbfs Now we need to make a directory on our hard disk where we can mount our windows share. mkdir /mnt/location

Mounting Windows Share

Now we\’re ready to mount the filesystem on our newly created directory (/mnt/location).

Mount with cifs mount -t cifs //server-ip-or-name/share /mnt/location -o username=user,password=pass,domain=DOMAIN Mount with smbfs mount -t smbfs //server-ip-or-name/share /mnt/location -o username=user,password=pass,domain=DOMAIN

Clean Up

When finished with our windows mount, we should exit the directory, or close any windows that are accessing it, and then unmount the Microsoft Windows NTFS share by using the following series of commands.

cd /; umount /mnt/location

Bypass firewalls using ssh and tunnelling.

Ever wanted to access a service behind a firewall that has port 22 open for ssh connections? This is a common setup known as using a jump-box for security access and to be successful at this we your firewall must allow port 22 traffic to your ssh jump-box. We can test our if port 22 is open by typing the following line.

telnet ssh-jump-box 22

If all is good then we should see something like Trying 192.168.1.200... Connected to ssh-jump-box. Escape character is '^]'. SSH-2.0-OpenSSH_4.7p1 Debian-8ubuntu1.2

In this example we’re going to create a tunnel for port 3389 windows rdekstop and we’ll begin by creating a local loopback port 3390 that ssh will tunnel from myMachine to myFireWalledMachine on port 3389

ssh -L 3390:server-behindFirewall:3389 user@ssh-jumpbox -N

Now we can access the service on port 3389 that was previously inaccessible through the firewall by pointing our connection to the local loopback port we just created through ssh. In this case we\’ll use rdesktop to hit that port as we are trying to remote desktop to a firewalled machine.

rdesktop localhost:3390

Using route , set your default gateway

Want to quickly set the route for your machine from the terminal.

Start by opening up a terminal window, and type the following, just make sure you have the ip address of your gateway to do so. In this case the gateway of 10.3.156.1 is being used.

route add default gw 10.3.156.1 eth0

We can see our changes by typing

route -n

Ubuntu Ibex 8.10 with ATI Radeon HD 2400 XT

So, I finally decided to crack out the new Ubuntu release, and the installer seemed to be successfull and it was time to reboot the machine which is where things went terribly wrong. My login screen was a blank screen.

So I then pushed CTRL+ALT+F1 to get to a shell, and noticed that by default the ati opensource video driver in xorg.conf wasnt happy at all.

Section "Device" Identifier "Configured Video Device" Driver "vesa" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection

So after googling a bit, i discoverd that support for this Radeon Series of cards was updated in later releases of the fglrx driver. Which can be enabled in 5 easy steps.

1. Remove all references to the older fglrx driver.

sudo apt-get remove xorg-driver-fglrx fglrx-kernel-source

2.Update the sources list

sudo apt-get update

3. Reinstall the newer drivers

sudo apt-get install xorg-driver-fglrx fglrx-kernel-source jockey-gtk xserver-xorg-video-radeon

4. Enable the fglrx drivers

sudo aticonfig --initial

5. Restart gdm

sudo /etc/init.d/gdm restart

We can now verify that we have the right driver installed by using fglrxinfo. osamad@root:~$ fglrxinfo display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: ATI Radeon HD 2400 XT OpenGL version string: 2.1.8087 Release

And voila, I then was able to launch the ATI Catalyst Control Center from the menu system Applications > Accessories > ATI Catalyst Control Center , and used that to enable my dual monitors.

After that I enabled the desktop effects and installed the compizconfig-settings-manager sudo apt-get install compizconfig-settings-manager System > Preferences > Compiz Config Settings Manager to enable my desktop cube! And now am a happy camper!

How to check and monitor cpu core temperatures in Ubuntu

Ok, so this weekend i decided to take the plunge and get myself a nice new box! I decided to go with Intel Core 2 Duo e5200 , and an Asus P5QL-E mother board, so anyways got everything mounted up and just installed Ubuntu Ibex 8.10 .. so now i wanna see what the temperature ratings are, and this is a snap with Ubuntu.

Open up a terminal and type sudo apt-get install lm-sensors sensord

After installation of those packages we have to setup our sensors with our cpu sudo sensors-detect

you’ll have to actually type Yes for all the next part, which is just asking about loading modules and drivers, for your cpu

So after all that we’ll have a little bit of editing to do, sensors will come up and tell you that you need to make some changes to /etc/modules, and will give you a snippet to paste into the file

sudo gedit /etc/modules

and then paste the code into the bottom of the file, for example this is what mine said

# Chip drivers coretemp #

Reboot and your all set, open up a terminal and type sensors to see your core temps! if you want to be real slick type watch sensors .. so you can watch the updates in the core temps every 2s .

Using a swapfile to increase the swap space on your system

This can be a very handy function if we want to use a file, instead of a partition, and with modern filesystems the performance is almost on par with using a dedicated partition for your swap area.

1. Using dd lets make a zero’d file for the swap

dd if=/dev/zero of=/swapfile bs=1048576 count=1000

This example would create a swapfile of 1 gig using a blocksize of a megabyte (1048576).

2. Make file as a swapfile

mkswp /swapfile

3. Activate swapfile

swapon /swapfile

4. Verify that our swapfile has been activated

swapon -s

We should see something like this in the list ..

Filename Type Size Used Priority /swapfile file 9999992 0 -2

If you want to have this a permanent solution, then adding the entry to fstab would probally be a better idea, open up /etc/fstab in your favourite editor and add the following line.

/swapfile swap swap defaults 0 0

Using Cisco vpn client with Ubuntu Linux Desktop

Configuration

Download and install the Cisco vpn Client. im using vpnclient-linux-x86_64-4.8.02.0030-k9 at the time of this article. (if u need it send me an email). unpack, and install in my installation i opted out of the option for starting as a daemon so i start it manually everytime.

mnk0@tree:~$ sudo /etc/init.d/vpnclient_init start

Using my PROFILE.pcf file

Then we can copy our Cisco VPN Profile over to the profile directory.

mnk0@tree:~$ cp PROFILE.pcf /etc/opt/cisco-vpnclient/Profiles/

Now we are ready to connect to our connection. Note we dont add the .pcf extension to the profile we’re going to use

mnk0@tree:~$ /etc/opt/cisco-vpnclient connect PROFILE Initializing the VPN connection. Contacting the gateway at 4.23.45.21 Contacting the gateway at 4.23.45.21 (balancing) User Authentication for PROFILE... The server has requested the following information to complete the user authentication: Username [mnk0]: Passcode []: Authenticating user. Negotiating security policies. Securing communication channel. Your VPN connection is secure. VPN tunnel information. Client address: 10.10.10.46 Server address: 4.23.45.21 Encryption: 256-bit AES Authentication: HMAC-SHA IP Compression: None NAT passthrough is active on port UDP 4500 Local LAN Access is disabled

Exiting

When we are ready to exit, just hit CTRL+C on your terminal session, and shutdown the daemon.

mnk0@tree:~$ sudo /etc/init.d/vpnclient_init stop mnk0@tree:~$ Done

keep broken files when trying to unrar a failed crc chek on a rar archive file

ok just a quick note ,, if you’re tryin to unrar an archive thats been corrupted or been split up into multiple parts, keep the broken parts using unrar.

more description

4 Rar files, part1-4, 3 fails becuase of a crc check issue, so you can recover part of the archive using the keep broken flag for unrar ‘-kb’

mnk0@tree:~/downloads$ unrar x -kb Bleach_Naruto Shippuuden 98 - 720p.rar UNRAR 3.80 beta 2 freeware Copyright (c) 1993-2008 Alexander Roshal Extracting from Bleach_Naruto Shippuuden 98 - 720p.rar Extracting Bleach_Naruto Shippuuden 98 - 720p.rar 99% Calculating control sums of all volumes. Cannot find volume Bleach_Naruto Shippuuden 98 - 720p.rar Bleach_Naruto Shippuuden 98 - 720p.mkv - CRC failed Total errors: 1 mnk0@tree:~/downloads$ ls Bleach_Naruto Shippuuden 98 - 720p.mkv* Bleach_Naruto Shippuuden 98 - 720p.mkv mnk0@tree:~/downloads$

Gnome Do, with Docky in Ubuntu Ibex 8.10 setup guide

I recently found out about an amazingly slick desktop dock, called Gnome Do. Not only is it great looking, but its functionality is what sold me on this one. With the ability to launch any app, from the launcher simply by typing the name Gnome Do has totally converted me.

I set this up on my Ubuntu Ibex Desktop with a couple easy steps.

Adding repository to Apt

Open up a gnome-terminal window, and then lets open up the file /etc/apt/sources.list . Paste the following into your terminal. gksudo /etc/apt/sources.list

Copy and paste the following repositories at the end of your file in gedit. # GNOME DO ###################################################### deb http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu intrepid main

Adding GPG Key to apt (Optional)

1. Open up gedit then copy and paste this PGP key to a text file, gnome-do.key and save it -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.0.10 mI0ESXUVdQEEAN8ALfH3wueKsSgDwA/HVEHdB7nlppqGKW/tubvGTy0ayf4M9ylX45szZK97 uL9/UHh5/B7eGMSB45EMJ0/qvTiflS6SwCxRCoKCW1PpYZlVcOLh5UUBkyREPJZcki1lK7pf xvG9LkYKnvBP89s2PnO5LlDheEsVR4SqDGEtich/ABEBAAG0JExhdW5jaHBhZCBQUEEgZm9y IEdOT01FIERvIENvcmUgVGVhbYi2BBMBAgAgBQJJdRV1AhsDBgsJCAcDAgQVAggDBBYCAwEC HgECF4AACgkQKKggUHdVjdCVeAP+ONJtMFx9MGSJe33YiskagXEG5cQGYdDi5sWWUAP80bP1 Qe+Dsnjs3VKQ9ZZW3M8UNXsoFFN501hgJFBwUUCWIRSGZkzVgKoZZtZOe0Dws39xfV//8JFS Te/r0oPzrr10iTFupTe/wBR0M9JbKGdY7SvooyqU+W2rf8/LldGx7KE= =3C2V -----END PGP PUBLIC KEY BLOCK-----

2. Open up the Software Sources Configuration Menu, and click on the Authentication tab. Then Import Key,

Installing Gnome Do

Open up a gnome-terminal window and type

sudo apt-get update then type sudo apt-get install gnome-do

Removing the default gnome panel

Dont worry, you can easily bring it back, we’re just gonna hide it, push ALT+F2 or from a gnome-terminal run gconf-editor

Navigate to ‘ Apps > Panel > TopLevels > top_panel_screen0 ‘ These are the values I changed to make it dissappear auto_hide = checked auto_hide_size = 1 hide_delay = 1 unhide_delay = 10000 x = 0 y = 10000

Select Docky

Launch gnome-do from the terminal or from ALT-F2 gnome-do Right click on the Gnome Do , launcher, then click on preferences, then click on the Appearence Tab, and select Docky. Now you have a desktop that looks almost as good as mine!! :)

Check out the website for most customization, and features. http://do.davebsd.com/

Using linux like a pro with mplayer, find & play mp3 files from command line in Ubuntu Linux 9.04 Jaunty

Save precious CPU and memory by using mplayer to play mp3s, also keep your playlist file up to date with all your mp3 media files.

First and foremost we need to have mplayer installed, if your on a ubuntu-debian based system use the following command to install mplayer, if not then you can download the appropriate packages and install them.

apt-get install mplayer

Lets make a home for our script file, and set the appropiate permissions

mkdir ~/scripts; touch ~/scripts/playme.sh; chmod +x ~/scripts/playme.sh; gedit ~/scripts/playme.sh

Paste the following code into your new script file, if you keep your Music files in a different location then change the variable musdir to match your setup.

#/bin/bash # VARS ########################################## tmpdir='/tmp' musdir='/home/osamad/Music' filename='playlist.m3u' # CODE ########################################## find $musdir -name '*.mp3' -o -name '*.ogg' 2>/dev/null >> $tmpdir/$filename mplayer -playlist $tmpdir/$filename -shuffle -loop 0 -radio volume=80

playme

Using find we build a list of all our mp3s, in this case we have multiple types of media files we want to play so we can specify that by adding the -o -name flags and add them in.

  • -playlist ;flag we set the playlist file we just created
  • -shuffle ; enables shuffle mode
  • -loop 0 ; enables loop 0=forever
  • -radio volume=80 ; set the default volume to 80% (use * or / to adjust when playing)

RunTime

Push ALT+F2 or launch from a terminal

./scripts/playme.sh

playme-terminal

MORE

To find out more information, or to customize your mplayer settings

man mplayer

Create a custom launcher and run your script from the gnome-panel

Data recovery the quick and easy way with ubuntu desktop linux 9.04

Ever had a failing disk? Using some hard drive recovery tools we can make salvaging our valueble data something possible. Using dd_rescue we are going to make an image of the hard drive onto a reliable storage area, then we can run whatever filesystem recovery utilities we want.

The beauty of ddrescue is that it is fully automated and will rescue all the blocks that it can read successfully on the first pass, and with any bad blocks it will come back and retry as much as possible.

Install ddrescue tools

sudo apt-get install ddrescue

Connect the failed disk to your system

By either plugging the drive directly into system, or using one of those usb enclosure or slotted drive device you’ll need to have your failing hard disk connected and unmounted before we can begin.

sudo dd_rescue /dev/sdb disk-image.img

mnk0@earth:~$ sudo dd_rescue /dev/sdb disk-image.img [sudo] password for mnk0: Summary for /dev/sdb -> disk-image.img:r: 0.0k, succxfer: 228352.0k dd_rescue: (info): ipos: 229376.0k, opos: 229376.0k, xferd: 229376.0k errs: 0, errxfer: 0.0k, succxfer: 229376.0k +curr.rate: 26249kB/s, avg.rate: 28391kB/s, avg.load: 13.5%

We can now mount this image on our system and take a look at the files.

mount -t ext3 -o loop disk-image.img /mnt/tmp

Good motherboard for K6-2 with UDMA chipset under Linux?

Extracted from askslashdot Tip provided by ? Seymour asks "I have recently been having various minor troubles with my motherboard and I am considering an upgrade. I am looking for suggestions of motherboards that will accept the K6/233 CPU (and the K6-2 or higher I guess), has an AGP slot, and takes DIMMs for memory. Also wanted is a chipset that Linux supports well for UDMA hard drives. Future upgradability to a K6-2 and a 100 MHz bus speed would be a plus, but not necessary. "AMD motherboards : Check out http://www.amd.com for recommended motherboards. I decided to get a FIC VA 503+ as an upgrade for my computer, because it's a super 7, with a BAT form, and I can keep my old memory. I am sure you will have different requirements. Good luck on your search. P.S. Checkout http://www.tomshardware.com . He has tested many of the motherboards that are recommend by AMD. My system... : I'm using the FIC PA-2013 with no problems. Get the 2MB version if you can (I'm running 1MB; they didn't have the 2MB available when I bought it). ACER AX59Pro : Using one of these puppies with a Pentium MMX, if you get one with the 1MB cache, they absolutely rock. VIA MVP3 chipset (supports UDMA ops in 2.2.0pre), ACPI PCI 2.10 support (BIOS v2.0), AGP, 4 PCI, 2ISA, 3 DIMM, 2 SIMM, selectable voltage from 1.3-3.5V, selectable CPU or AGP memory clock timing, FSB speed of 60-112MHz, USB, etc. in a ATX factor. Only thing is that the HWMon doesn't use standard chipsets, so if you like LM75/78 monitoring, no can do. Avoid Micro-Star ALI based motherboards : We were selling them at work for a while, and they proved to be very fussy about the RAM they had in them. Typical symptoms included fatal exceptions, hanging on boot, etc. The problems were mainly with 32mb DIMMs, so if you were using larger ones you'd likely be fine. Shame, because they were nice boards other than that. FIC/Chaintech/Asus : IMO, the best choices are - FIC PA-2013 - caches 256 megs, does 112Mhz FSB, but only 4 PCI slots Asus P5-A - 5 PCI slots, can get it with audio on board, can overclock up to 125Mhz in 5Mhz increments but will only cache 128 megs of ram Chaintech somethingorother - 5 PCI slots, caches up to 512 megs, can't overclock, difficult to get (Unfortunately no perfect board) FIC VA-503+ : I recently upgraded my primary workstation with a FIC VA-503+ and an AMD K6-2 (333Mhz, Overclocked to 380 Mhz). Motherboard and CPU for about US$200. RH5.2 linux runs great on it. Toms Hardware Guide has a good review of "Super 7" motherboards. There are definitly some tradeoffs with the available MBs, so consider which things are important to you and which things are not, and choose a MB which matches your needs. AOpen AX59Pro : I have had good luck with the AOpen AX59Pro with a K6-2 300. I have never had a system crash that was not directly attributable to a software error, e.g. X screwing up in DGA mode. I typically leave my system running 10-20 days at a time without problems. The BIOS is very flexible, too. You can find out more on Tom's Hardware Guide ( http://www.tomshardware.com ). ASUS P5A : The Asus PA5 motherboard uses the ALI chipset, supports most socket 7 CPUs, has 2x AGP slot, 100MHz FSB support, uses DIMMs, and is very happy with my AMD K6-2 350MHz RISE R-582E : I just got the RISE R-582E for my k6-2 350 because the price was great ($55). Supports SIMMs or DIMMs, USB, and APG. BAT factor. I've had no problems with it. One more that works : The Soyo 5OEHM. "Only 1Mb" cache though, and only 3 PCI slots and 2 DIMM slots (2 SIMM slots and 3 ISA ones also still available). DFI P5BV3+ : Works killer, I've installed 5 in the past 5 months and I love them. Lots of PCI, very fast and easy to setup. Tyan S1590S : Good motherboard. Have had no problems. Large L2 cache. AT form factor. No problems, just remember to get the Tyan Bus mastering drivers from http://www.tyan.com It depends if you need an AT or ATX form-factor ma : For the AT form-factor, Tyan has an excellent board with the VIA mVP3 chipset, the S1590S. It has 9 slots (yes, 9, 8 usable in a 1/4/4 AGP/PCI/ISA config) with 3 DIMM and 2 SIMM slots and a 1MB cache. For the ATX interface, the FIC PA-2013 2MB version sports a massive 2MB L2 cache (1MB is standard, you want the OEM 2MB version)! It also features a 1/4/2 AGP/PCI/ISA config with 3 DIMM slots. Also for ATX is the Soyo SY-5EHM+, a good choice with 5 PCI slots (1/5/2 config) and 3 DIMM slots. All boards feature Award BIOS (Tyan give you the additional option of AMI BIOS, although I would stick with Award). I think the only drawback is the lower voltage limit at 2.0V (which may keep it from using future 0.18um K6-3 processors above 500MHz speeds). But, then again, a 0.18um K6-3 may never see the light of day as AMD pushes out the K7 with priority. You will be fine with K6-2 and K6-3 processors upto 500MHz since they run at 2.2-2.3V (possibly 2.4V for the 500MHz parts?). Good motherboard reviews on super7.net : The motherboard reviews super7.net ( http://www.super7.net/ ) are very good. It also contains a forum for users to post their comments about each of the Super 7 boards listed. After deceiding on on a short list, I'd suggest dejanews as the next best way of making selection. However you pretty much can't go wrong by chosing one of the Asus, Epox, Aopen, Soyo, or Fix motherboards. The FIC PA 2013, should be coming out with a 2MB L2 version which will go well with the K6-3 relatively soon. Personally I wanted the Epox EP-MVP3G-M, but poor distribution in the UK, meant I ended up buying the Asus P5A. On Monday I'll know how good this board is, when I get the parts for my K6-2 350 system.

Encrypted filesystems for Linux

Extracted from debian-user Tip provided by John Kuhn I am wondering what is the recommended way to secure a sizeable volume (0.5-2GB) of confidential data such that it is non-retreivable/unusable even in the event that a hacker has gained user level or root access? There are a few encrypted filesystems for Linux. Ones aimed at distributed filesystems (NFS replacements): - "CFS", which has been packaged and is available from non-us.debian.org. - "TCFS", http://tcfs.dia.unisa.it/ I used CFS several years ago and it seemed to work well. My only complaint was that triple DES was a bit slow on my 486/33. Another approach which I am currently using involves patching the kernel to provide kernel level encrypted filesystems. I have updated a patch for kernel 2.0.36 which was originally released in 1996 for kernel 2.0.11. I have gotten good results with this using IDEA encryption on systems ranging from a 486/33 to PII-350. There are now encryption patches available for the new 2.2.x kernels. ftp://ftp.kerneli.org/pub/linux/kerneli/v2.2/patch-int-2.2.1.1.gz will add encryption to linux 2.2.1. I have not used this patch yet, but I will give it a try as soon as I update to slink and have a 2.2.x compatible system. When unmounted, the ability to scan the raw partition will not give your cracker any useful information. If they are really determined, they could scan raw /tmp and swap partitions for traces of sensitive data. Whether this is an issue depends on your required security level. When mounted, a root cracker would be able to read the all files on the partition. Mounting the partition requires a passphrase. The kernel approach will require patching and building custom versions of the kernel and mount programs.

Linux Tips

Linux dialup servers

Extracted from comp.os.linux.networking Tip provided by Josh Gentry
I would expect that lots of people out there are needing to set up
Linux
dialup servers.  I recently completed this task, and have written a
report of the process.  You can find it at:

http://www.swcp.com/~jgentry/ppp.html

How to use 2 modems under Linux?

Extracted from debian-user Tip provided by Kirk Hogenson Is it possible to set up two modems under Linux and use the bandwidth as one entity... 2 x 56k modems to give 112k speed? You probably won't get the full 112, but you can use two modems at the same time. You will, of course, need two phone lines... The kernel option you want is called EQL, or "serial line load balancing". It is described in section 6.2 of the NET-3-HOWTO. You'll need the eql tools, and I think there is a debian package for it in potato. MP3 encoder for Linux ? Extracted from debian-user Tip provided by Matt Garman Does anyone know of mp3 encoder for Linux? If yes, where would I be able to find one? I don't think there are Deb packages for these, but you can definately install them in /usr/local. 8hz-mp3, http://www.8hz.com bladeenc, http://home8.swipnet.se/~w-82625 Bladeenc is supposedly faster.

Linux on a Toshiba laptop (Linux Laptop Homepage)

Extracted from debian-user
Tip provided by Martin Schulze

Does anyone know how I can load Linux onto a Toshiba Prestege 300CT??
I created a copy of the bost disks from the web site (along with the
base files on disk) yet I cannot get Linux to start.  Everytime I try
to boot, the computer restarts.  I tried the other Toshiba boot files
and got the same problem.

Is that a laptop?  If so you should take a look at the Linux
Laptop homepage to find out if Linux runs on your machine and
if it needs some modifications.

http://www.cs.utexas.edu/users/kharker/linux-laptop/

Various SQL databases performance on Linux systems

Extracted from debian-list
Tip provided by Kevin Cheek

See http://www.tcx.se/benchmark.html for some interesting benchmarks
comparing several common db systems including oracle, ms-sql, pgsql,
and others.

For a pretty comprehensive comparison of database system limitations
and capabilities, see http://www.tcx.se/crash-me-choose.htmy

I use MySQL for my work and am extremely happy with it. It is
extrememly reliable and extremely fast. It is significantly faster
than pgsql and in my experience, it is also much more reliable (I used
pgsql before I switched to MySQL). MySQL doesn't support some of
Oracle's features like transactions, views, etc, but since I don't
need them, I can benefit from the much smaller and faster MySQL
system.

MySQL has no problems dealing with large sets of data and large
BLOBS. I have one MySQL db that contains over 3.5GB of data. In that
db, two of the tables are over 1.5GB (they contain mostly TIFF
images). Performance is great even with those relatively large table
sizes.

Does anyone have a feel for the relative performance of the various
SQL databases in Debian ? I'd also be interested to know how these
compare to something like Oracle (under either NT or Linux).

I'm looking to manage two databases: one of roughly ten thousand
records a few k in size, the other 100,000 rather smaller records. It
might well be feasible to use something like gdbm for the latter one.

Postgresql runs like greased lightning.  In some tests involving
0.5 million records of a few K in size, it blew away MS SQL Server.
I think it was version 6.  Postgresql runs well, although it does have
some limitations.  ODBC was the main weakness I noticed.  We're currently
deploying Oracle on a Debian server...

Oracle is bloatware even by Microsoft standards.  I can't comment on
speed yet.

How to convert Eudora folders to Linux ?

Extracted from debian-list
Tip provided by Roberto Ripio


Is it possible (and how :) to convert Windows Eudora Folders, and
Adresses to Linux?

I will reference to my actual setup,
using Kmail (from KDE).

First of all, some terminology: what is called 'folder' under kmail-linux was
called 'mailbox' in Eudora-win, being 'folder' used to name subdirectories
for hierarchical archiving.

If mailboxes was what you meant, then no conversion is necessary. Eudora
mailboxes are in UNIX mail format. I simply copied the .mbx files to my
mail subdirectory, /home//Mail, opened kmail, and voila, they were
ready to browse.

Different mail setups may have differences in the details, but the important
thing in that your Eudora mailboxes are actually UNIX mail folders.

Eudora addresses are not much complicated. Wherever you have your Eudora mail
you will find a file called nndbase.txt. Simply erase the first two entries
in each record: The first is the word 'alias', and the second the actual
value of alias. What will remain in each record will be somethig like
"Roberto Ripio" . In my setup, I had to copy the edited file
to "/home//.kde/share/apps/kmail/addressbook".

How to scan DOS/Windows files for virus under Linux

Extracted from debian-list
Tip provided by Robert Woodcock

Mcafee virrusscan


I looked at this yesterday.  It appears to be an a.out executable.  I
don't have a.out/libc4 anymore, and I suspect I'm not alone.  Are you
aware of a newer version?  It would be nice to have a virus scanner on
my Linux machine, since I receive a lot of Windoze e-mail attachments
and have several Samba shares.

mercury:~$ ldd /usr/lib/neta/uvscan
    libc.so.5 => /lib/libc.so.5 (0x4000c000)

That's what's in ftp://ftp.nai.com/pub/antivirus/unix/linux/nlxb318e.tar

A debian installer package of the
aforementioned Virusscan product is available at:

http://http.us.debian.org/debian/dists/slink/contrib/binary-i386/admin/uvscan_3-3.deb

How to Change the Font size of Web page?

If you are visiting a website or reading an e-mail and there is some problem to read text due to color of page or the font too small. You can change the font and color as well to solve this problem.

  • To increase or decrease your font size and color of webpage in Internet Explorer, select the Tools option from the top of your Explorer window and go to the Internet options.

  • Here go the General option and then click on Accessibility button on right lower of the dialog box.

  • Now change the status of checkbox marked "Ignore font sizes specified on Web pages" and next Ignore Colors specified on Web pages", end with Ok.

  • For change the font size select to View option from the top menu and go to Text size option to change it.

How to avoid fake Security Warnings or pop-up?

When you are browsing the internet and suddenly a window pop up with different messages for example" free update for your computer ","scan your computer with free antivirus". May be some pop-ups messages helpful for you but you should read first in detail before clicking it. Pop-ups basically an advertiser message or unwanted program and website that might be disturb your computer performance.

If you are working with Internet Explorer and want to block the pop-ups windows and unwanted messages. Open the Internet Explorer and click on Tools menu and go to Pop-up Blocker option, here you can Turn Off Pop-up Blocker to block pop-up from all websites. But you have option to allow some websites for pop-up. For this purpose open the Pop-up Blocker Setting. Here you can add some specific websites name to allow for pop-up and click Add. If you feel any problem to block any pop-up message due to some problem, simply click on the X at the right top of the pop-up windows.

Play With Your Favorites

A cool tip to move your favorites list, because there is no any option to copy it. But using a method you can create a printable HTML document.

To create this HTML list, first open Internet Explorer. Here go to File option then you will find here option Import and Export, to run the Import/Export wizard Click here then Next.

Here you can select what to import and export, Select Export Favorites option then click Next button. Next you will get option which folder you want to export. You can select the top folder Favorites or just a specific folder.

Select "Export to a File or Address" option and give it a name and location. Click Next and Finish it. Now you have one html file and you can move it any where with you.

How to operate Gmail account using shortcuts keys?

You can operate your Gmail account using keyboard shortcuts keys instead of mouse to navigate. Basically keyboard shortcuts keys help you to save time and you can perform any tasks without leaving the keyboard keys. Many computer applications help you to create your own custom shortcuts keys to enjoy even more flexibility.

Useful Gmail account Shortcut keys

Shortcut keys Action

f Press simple f help you to forward email message to next

Shift+I Use to mark email message as read

Shift+u Use to mark email message as unread

r Reply to the sender of mail

a Reply to the all email recipients

Ctrl+c Use to save current email as draft

Z Press z key to undo any previous action

? Display the keyboard shortcut keys help

c Press c button to compose an new email message

/ Press / button to move your cursor in search box

u Press u key to refresh your email account to view latest email

! Press ! key to mark an email message as spam

p Press p key to move cursor to precious message

. Press . key to display more options

Esc Escape cursor from any current field.

Internet Error Codes and Meaning

Sometime you are browsing the internet and trying to open any website, your e-mail and any FTP sites , but you see different error codes there. You should be familiar with these error codes. You can solve these problems if you are well-known with the meaning of error codes.

Error Codes Meaning

400 This is bad request error, First check you may be typing wrong URL name and server could not understand your request.

401 You are trying to open any unauthorized access site or page. Check your username and password if you are trying to open any webpage.

402 Payment Required Error

403 You are trying to open any forbidden page and you are blocked by that domain.

404 Here you are trying to open the webpage that was removed or re-named, also check the URL spelling.

408 This is time out error. you should send the request with in time that the server set for you.

How to speed up your slow internet connection?

Today a special tip for those who are still using any slow dial-up internet connection due to unavailability of any broadband connection in their area. The Web Accelerator application designed to provide the full acceleration for your routine web sites browsing. With the help of Web Accelerator you can browse your internet 4 to 6 times faster than normal dial-up connection. Basically this services compressing the website text data, images and heavy graphics to open or download this data with high speed.

This technique is more useful for static websites and for email applications but don't accelerate with secure and downloading audio or video files. Some good web accelerator retains your system cache to reuse websites with faster speed and can also block windows pop-up. If you are using FTP sites and downloading any program using dial-up, then web accelerator is not for you. There are various web accelerator software are free available on internet, visit and download it to enjoy your connection.

How to Customize Your Browser Toolbar?

You can customize your system web browser toolbar according to your need. There are many toolbar buttons you never used. You can add some mostly used buttons for example "Paste" or "Print Preview" in your browser toolbar or remove with same option.

If you are using Internet Explorer then right click on the empty area of the toolbar and select the option "Customize". Here you will find a list of options in left and right panel, if you want to add any toolbar button then simply highlight it from the left panel and click on the "Add" button. But if you want to remove any toolbar button then first highlight it from the right panel and click on the "Remove" button.

You can also change the order that buttons appear by moving them up and down from the list.

How to configure Linux Files Permissions?

Three types of permission read write and execute, Ever file and folder have three relations owner group and

others

[ Read = r write = w execute = x ] [ owner = u group = g other = o ]

[root@pc1 ~] # Ls -Ld /disk

1= nature of object [d=dir -=file L=link]

2= first three permission for owner [ rwx ]

3= second three permission for group members [ r-x]

4= third three permission for others [r-x]

5= number of inodes contain by this directory

6= owner of directory

7= group of directory

8= size of directory

9= creating date of object

10= name of object

[root@pc1 ~] # Ls -L /disk

Drwxr-xr – x 2 root root 4096 Jan 1 1988 dir1

Drwxr-xr – x 2 root root 4096 Jan 1 1988 dir2

Drwxr-xr – x 2 root root 4096 Jan 1 1988 dir3

Changing permission = give write permission to other on /disk

[root@pc1 ~] # chmod 0+w /disk

Give read write and execute permission for group on /disk

[root@pc1 ~] # chmod g+rwx /disk

Assigning read writ and execute permission to user, group and other with single command

[root@pc1 ~] # chmod u+rwx , g+rwx, o – rwx /disk

Assigning different permission with different commands which separate with semicolon

[root@pc1 ~] # chmod u+rwx /disk ; chmod g+rwx /disk ; chmod 0+rx /disk

Using number system =----- [ Read = 4 ] [ Write = 2 ] [ Execute = 1 ]

rwx=7

r-x=5

---=0

Assigning full permission to owner and no permission for group and others

[root@pc1 ~] # chmod 700 /disk

Assigning full permission for owner and group no permission for other

[root@pc1 ~] # chmod 700 /disk

Assigning full permission to all

[root@pc1 ~] # chmod 777 /disk

Assigning full permission for owner and read, and execute for group and others

[root@pc1 ~] # chmod 755 /disk

Assigning no permission for all

[root@pc1 ~] # chmod 000 /disk

Assigning sticky bit permission for other

[root@pc1 ~] # chmod o+t /disk

Assigning suid permission for owner

[root@pc1 ~] # chmod u+s /disk

Assigning sgid permission for group

[root@pc1 ~] # chmod g+s /disk

Free Linux Help Line

[root@pc1 disk]# man mkdir

[root@pc1 disk]# info mkdir

[root@pc1 disk]# whatis mkdir

[root@pc1 disk]# mkdir - - help

[root@pc1 disk]# apropos "partition"

How to manage users accounts in Linux?

Adding user with graphical utility

Show the properties of tony user

[root@pc1 disk]# id tony

Uid=501 (tony) qid=501 (tony) qroup=501 (tony)

Add tow uses john and jhosen with different command with default properties

[root@pc1 disk]# adduser john

[root@pc1 disk]# useradd umer

Assigning password to john

[root@pc1 disk]# passwd john

Add a group

[root@pc1 disk]# groupadd cisco

Customizing users properties at the time of creating user

[-u uid ] [-g primary group] [-G secondary group] [ -c comments] [ -d home directory path ] [-s login shell ]

[root@pc1 disk]# usersadd -u 600 -g cisco -G saad -c "Manager" -d /etc/jonny -d /bin/sh jonny

Modify user properties with usermod command

[root@pc1 disk]# usemod -u 666 -s /bin/bash jonny

Delete a user jonny with his home directory

[root@pc1 disk]# userdel -r jonny

Delete a group cisco

[root@pc1 disk]# qroupdel cisco

All users information stored in /etc/passwd every user have a seven column line in this file

1-user name [ user authenticate at the time of login from the first column of /etc/passwd ]

2-password required [ x means users must required password if remove this x user can login without password]

3-uid [ 500 first user id 0 to 499 id's are reserved 0 for root user and remaining for services users ]

4-gid [ every user relate with any group which stored in /etc/group ]

5-comments [full name but it is not compulsory only for information ]

6-home directory path [ linux file system is read only for normal user only his home directory is with full

permission for normal user

7-login shell (/bin/bash, /bin/sh, /bin/tsh, /sbin/nologin) every user required a shell for login without shell user can never login at machine.

[root@pc1 disk]# gedit /etc/passwd

All groups stored in this file

[root@pc1 disk]# edit /etc/shadow

User password stored in this file

[root@pc1 disk]# gedit /etc/group

Linux Basic Commands

For changing directory / to /etc

[root@pc1 /]# cd /etc

One step back /etc to /

[root@pc1 etc]# cd ..

Go to previous working directory

[root@pc1 /]# cd -

Go to current login user home directory

[root@pc1 etc]# cd ~

Show the contents of /etc in single color

[root@pc1 ~]# dir /etc

Show the contents of /etc in different colors with nature of contents

[root@pc1 ~]# Ls /etc

create a folder on root partition

[root@pc1 ~]# mkdir /disk

Create a folder in /disk

[root@pc1 ~]# mkdir /disk/dir

Create multiple folder in multiple directories with single command

[root@pc1 ~]# mkdir /etc/dir1 /var/dir2 /usr/dir3

Create multiple folder in same directory

[root@pc1 ~]# mkdir dir1 dir2 dir3

Copy a file in directory

[root@pc1 disk]# cp file dir

Copy a file from /disk/file and paste it in /disk/dir/

[root@pc1 disk]# cp /disk/file /disk/dir

Copy a directory with –r option

[root@pc1 disk]# cp -r dir dir2

Copy a file from /disk/file and paste it in /etc with myfile name

[root@pc1 disk]# cp /disk/file /etc/myfile

Remove a file

[root@pc1 disk]# rm file

Remove a file with forcefully option

[root@pc1 disk]# rm –f file

Remove a directory with out –r option and you face will an error

[root@pc1 disk]# rm dir

Remove a directory with –r option

[root@pc1 disk]# rm -r /disk

Remove a directory with forcefully option

[root@pc1 disk]# rm -rf dir

Move /etc/dir1 to /disk/ with different name

[root@pc1 disk]# mv /etc/dir1 /disk/mydir

Rename the folder name mydir to dir

[root@pc1 disk]# mv /disk/mydir /disk/dir

Rename the file name with myfile

[root@pc1 disk]# mv file myfile

Read a file page by page with less command

[root@pc1 disk]# less /etc/grub.conf

Read a file page by page with more command

[root@pc1 disk]# more /etc/qrub.conf

Read first ten lines of grub.conf

[root@pc1 disk]# head /etc/grub.conf

Read last ten lings of grub.conf

[root@pc1 disk]# tail /etc/grub.conf

Read first 12 lines with –n option

[root@pc1 disk]# head -n 12 /etc/grub.conf

Read last 11 lines with –n option

[root@pc1 disk]# tail -n 11 /etc/grub.conf

Copy the contents of /etc/grub.conf in /disk/file

[root@pc1 disk]# cat /etc/grub.conf > /disk/file

Append the contents /etc/mtab in /etc/file

[root@pc1 disk]# cat /etc/mtab >> /disk/file

Merging tow commands with pipe sign output of the first command is input of second command

[root@pc1 disk]# cat /etc/squid/squid.conf I more

Count the total lines of squid.conf

[root@pc1 disk]# cat /etc/squid/squid.conf I wc -L

Show only spool words in squid.conf

[root@pc1 disk]# cat /etc/squid/squid.conf I grep spool

Flush the contents of file

[root@pc1 disk]# cat /dev/null > /var/log/messages

Tips And Tricks. Powered by Blogger.