SteveOH

Tag: ubuntu

Ubuntu / Debian Windows 7 Dual Boot System Encryption with TrueCrypt

by on Jun.02, 2011, under Technology

I will be doing this configuration on my test machine very soon since my previous guide (here) is a bit outdated.  For now you can follow the previous instructions and modify them per the instructions below:

From SuperUser:

I’ve done it :) but not exactly like in your link, because of some kind of (bug?) in 2 (tutorial is with “1″ but I’ve 2), specifically in this

title /Longhorn
rootnoverify (hd0,0) makeactive
chainloader (hd0,1)/.mbr
boot

The problem is known and posted on many forums.

My was:

  1. Windows7 partition using truecrypt, selecting Single boot and overwriting Grub2 loader with truecrypt loader
  2. Boot from Rescue CD and install grub2 bootloader NOT on MBR but on /dev/sda3 which is / partition (so truecrypt loader was not overrided)

Now while booting truecrypt bootmenu is shown and if I’d access Win7 I’m entering password, but if I’d enter debian (via Grub2) I hit esc key and then truecrypt loader is searching all other partitions for boot loader and finding Grub2 which resides on /dev/sda3 and load system properly.

I think its the best way to do this for now (until sb find resolution for Grub2 to read /boot/truecrypt.mbr without errors).

1 Comment :, , , , , , , , , , , , , , more...

Ubuntu / RoundCube WebMail Domain Mismatch Issue – Internet Explorer – ERROR: Your Browser Does Not Support / Accept Cookies

by on May.16, 2009, under Technology

Introduction

When the domain in the URL of your RoundCube instance and the domain the page is actually being rendered from are different are different, you will recieve an odd message – your browser does not support cookies – from RoundCube.  My set up has an iFrame from one Domain redirecting to another, where RoundCube sits.  Why did I do that? Because the actual domain is ugly and my client requested the web login to their be the same as the actual domain their emails come from.

FireFox and Chrome allow the login to work fine, but not IE.

However, Internet Explorer does not allow cookies from a 3rd party domain (the second one in the iFrame) to be downloaded, and silently deletes them – measure I suppose – it is widely documented.  The only way to get around this is to modify the headers sent to notify the browser that the mismatch is intended.

Email Domain: emailDomain.com
Web Domain: webDomain.com
RoundCube URL: webDomain.com/webmail
IMAP Server: .emailDomain.com
Redirects: emailDomain.com redirects HTTP traffic to webDomain.com, emailDomain.com redirects SMTP traffic to webDomain.com

NOTES: emailDomain.com is basically just an alias. 

If you try to login through webDomain.com via RoundCube (actually type in webDomain.com/webmail) it will work, the cookies will match up and everyone will be happy.

If you try to login through emailDomain.com (which will open up webDomina.com/webmail in an iFrame) it will not work with Internet Explorer 7 or 8.

I added the following line of code to the first line of code (after the comments) within the index.php file.

file: /var/www/webmail/index.php (please note that webmail is where RoundCube is installed)

header(‘P3P:CP=”IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT”‘);

1 Comment :, , , , , , , , more...

Adding multiple users to Ubuntu e-mail Server using a script

by on May.16, 2009, under Technology

These two scripts are very important for the admin who regularly works with servers and somehow forgets to backup his system username and password! Let’s say somehow we lost the usernames and passwords of the . In this case the admin has to manually create all the users and then change the passwords for all the users. Tedious . Let’s make our life easier.

First create a file which contains all the user name. Something like this:

nurealam
nayeem
mrahman
farid
rubi
sankar

Save the file as userlist.txt. Now create the following bash file:

#!/bin/sh
for i in `more userlist.txt `
do
echo $i
adduser $i
done

Save the file and exit.

chmod 755 userlist.txt

Now run the file:

./userlist.txt

This will add all the users to the system. Now we have to change the passwords. Let’s say we want username123 as password. So for user nayeem the password will benayeem123rubi123 for user rubi and so on.

Create another bash file as follows:

#!/bin/sh
for i in `more userlist.txt `
do
echo $i
echo $i"123" | passwd –-stdin "$i"
echo; echo "User $username’s password changed!"
done

Run the file. All the passwords are changed.

If you want to force all your users to change password, use the following code:

Force all your users to change their passwords because the temporary password is a risk

#!/bin/sh
for i in `more userlist.txt `
do
echo $i
echo $i | change -d 0 "$i"
echo; echo "User $i will be forced to change password on next login!"
done

I then log as that user and see this

WARNING: Your password has expired.
You must change your password now and login again!
Changing password for user amcorona.
Changing password for amcorona
(current) UNIX password:

1 Comment :, , , , , , , , , , more...

Ubuntu Mail Server – PostFix, DoveCot, RoundCube Authentication Error

by on May.11, 2009, under Technology

I’ve been dealing with this for the past 2 weeks, trying to authenticate to my IMAP (dovecot) over SSL (SASL). I continuously received errors for IMAP authentication. AtMailOpen did not work (and I cannot get it to authenticate correctly). So I tried RoundCube, which looks like a good mesh of functionality and aesthetics.

RoundCube installed great – easy and straight forward. Here is the error I received:

IMAP Error: Authentication for @thelambdas.com failed (LOGIN): “a001 NO Authentication failed.”

Warning: Cannot modify header information – headers already sent in /var/www/webmail/program/include/rcmail.php on line 951

There is very little to no solutions out there.  So I had to play with the configuration file and each argument, one by one (file: main.inc.php in the config directory).

Leave the username_domain field blank.  My server, apparently, doesn’t require the full address, only the user name, for authentication.

From:
$rcmail_config['username_domain'] = ‘example.com’;

To:
$rcmail_config['username_domain'] = ”;

This solved the , and I’m able to log in using ONLY the user name (ie. username, not username@example.com).

Good luck.

6 Comments :, , , , , , , , , more...

Ubuntu / Vista Dual Boot – Full Encryption with TrueCrypt

by on Mar.12, 2009, under Technology

sda1: encrypted with
sda2: Hardy Heron /boot partition (not encrypted)
sda3: Ubuntu Hardy Heron encrypted volume with LVM inside and / and swap partions within LVM (to save partitions used overall incase it gets over 5 partitions)
sda4: Working on installing OSX Leopard on this partition currently.

The steps I used are as follows, in brief:
1) Installed Vista first (actually pre-installed on laptop)

2) Installed Ubuntu second using encrypted physical volume with LVM inside it and 2 partions / and swap inside the LVM(at this point, was in the MBR)

3) Ran full windows (not full disk ) through TrueCrypt and let it write its bootloader to the MBR. (obviously overwriting Grub in the MBR)

4) Booted with a live cd and copied the truecrypt bootloader from the MBR to a file in the /boot partition (sda2)
use these commands to do so:
dd if=/dev/sda of=/mnt/boot/truecrypt.mbr count=1 bs=512
dd if=/dev/sda of=/mnt/boot/truecrypt.backup count=8 bs=32256

5)Reinstalled grub to the MBR using these commands:
sudo grub
install (hd0,1)/grub/stage1 (hd0) (hd0,1)/grub/stage2 0×8000 p

6) Added a chainloader to the menu.lst Vista entry to point to the truecrypt bootloader within the /boot partition like so:

title Windows Vista/Longhorn
rootnoverify (hd0,0)
makeactive
chainloader (hd0,1)/truecrypt.mbr
boot

The only partition not encrypted in the /boot partition so far, which is fine. After grub loads, no matter which OS I choose, I enter a passphrase and that OS starts.

For more detailed instructions which I pulled from but which are for instead of Vista, use this link:

http://ubuntuforums.org/showthread.php?t=761530

11 Comments :, , , , , , , , , , , , more...

Ubuntu (Hardy Heron) freezes while playing MP3

by on Dec.03, 2008, under Technology

I believe this to be caused by a recent update to the GStreamer plugins and codecs for MP3.

To solve this , I had to completely remove (using Synaptic) Totem, MusicPlayer and GStreamer, reboot, and reinstall Totem.  Then open an MP3 and it’ll ask to install the GStreamer codecs.

Next time you run updates, make sure you deselect those dealing with audio.

Leave a Comment :, more...

Ubuntu on a Flash Drive (or SSD)

by on Dec.02, 2008, under Technology

Use these tips to speed things up.  My boots up in 34 seconds (to login screen) from 49 seconds and loads Gnome in 6 seconds now.  My flash drive is a Super Talent 8GB SM Style USB Flash Drive, with sustained reads at 30 MB/s. and writes at around 10 MB/s (I believe).

http://wiki.eeeuser.com/yet_another_way_to_install_ubuntu_710

Leave a Comment : more...

Fix Windows MBR using Ununtu

by on Sep.10, 2008, under Technology

So, I’ve been dieing to get an LiveUSB drive to work correctly.  I’ve been semi-successful.  It will work, but once you put it on another computer it gets flakey.

Anyway, I tried utilizing the standard Ubuntu installation from the CD, which allows you to simply install to a USB Flash drive.  Great.  I was doing this on a laptop with already installed.  What the installer did, however, was overwrite the MBR of the Windows installation and installed (this is standard and OK).  However, this isn’t what I needed, because the will not boot up if the USB drive is not connected – There’s no BOOT LOADER! ahh!

I tried using a Windows Installation Disk to it, however, I did not have drivers (or a floppy drive for that matter) for the SATA Hard Disk Drive (HDD) (BTW, what’s up with Windows STILL not fully supporting SATA out of the box for XP?!  Maybe it’s SP2′s fault, who knows).  So therefore, I could not use the typical fixmbr command from the Recovery Console.

To fix it I did the following.  I booted up using the Ubuntu installation on the USB drive.  Then I ran the following commands:

  1. sudo apt-get install lilo
  2. sudo fdisk -l
  3. Find the windows installation: mine was on /dev/sda
  4. sudo lilo -M /dev/sda
  5. sudo reboot 0

This will place a boot loader on the windows disk and allow it to boot, without a hitch.  No, the Windows bootloader is not installed, but it works, and you will not notice the difference.

I hope this helps.  Good luck.

Leave a Comment :, , , , , , more...

Vundo / VundoMunde / VundoMundo Trojan Removal

by on Jun.24, 2008, under Technology

So I recently got bombarded with 2 infections of this pesky beast. Some variants are easy to remove (SpyBot can simply pull them out) but the variant I came across was resilient. It loaded a DLL into the Winlogon.exe (injection) executable file (the responsible for authentication to the – Windows cannot run without it) and ran from there. So you can’t kill the process, because the OS will reboot. You can’t delete the DLL file, because the OS has it locked. Basically, it’s like a tumor in the center of your brain… there’s really no winning.

There are a few solutions out there (very few) such as Bayles’ solution and this one from a poster on TechRepublic , but unfortunately, neither was any good for me. Bayles’ works for variants that inject into Explorer.exe, which is loaded once the OS is loaded and you log in. However, winlogon is loaded as one of the first steps in loading the registry, so it’s loaded even before you press control-alt-delete (it’s actually the process that shows you the login screen). The other could have worked had I had administrative privileges on my machine, but I did not (this is my work machine). Therefore, I had to find another to bypass the OS from reinfecting itself, but still have access to the underlying file .

I could have removed the , but I did not have another laptop to install the HDD into. I couldn’t boot to the Recovery Console using an CD, because I did not know the Administrative password. So my solution? I booted the laptop using an CD I had in my laptop bag. Here’s what I did.

  1. Boot normally in Windows XP and get the names of the infected DLLs using Bayles’ method (again, pendmove won’t work because winlogon is placed in memory (with the infected DLL) before pendmove is loaded).
  2. Reboot using Ubuntu CD – hit enter at the first screen (Run or Install Ubuntu)
  3. Unmount the NTFS file system (on a typical installation, it will be the entire drive) – We do this because the standard driver file is a read-only NTFS driver.
  4. Open a terminal and install the ntfs-3g packages
    1. sudo apt-get install ntfs-3g
  5. Create mount point
    1. sudo mkdir /mnt/test
  6. Mount the hard drive
    1. sudo mount -t ntfs-3g /dev/sda1 /mnt/test
      1. /dev/sda1 – is the partition we want to mount, yours may be different
      1. /mnt/test – is the directory in which to mount the partition
  7. You can then browse to the windows/system32 directory and delete the infected DLLs (in my case the path was /mnt/test/windows/system32/sbbqikklll.dll)
  8. Reboot and then you must run some scanners. I suggest running SpyBot to clean up the rest of the garbage, and then maybe an anti-virus scanner (I used Symantec Corporate). Finally, run the Windows Malware Removal Tool.
    1. This step is extremely important. This trojan downloads other infections to your systems (ads, other programs, etc). Who knows if these other files contain other viruses, trojans, keyloggers, etc.

I hope this helps. Contact me if you need any special assistance.

Leave a Comment :, , , , , , , , , , , more...

VirtualBox F8 Error

by on Oct.23, 2007, under Technology

When running VirtualBox on (Fiesty) and trying to install as the guest OS, you must press the F8 key to accept the Terms of Usage.  However, VirtualBox won’t let you for some strange reason.  After looking around for a little bit, I tried the combination Right Ctrl + F8 and it worked!  So I can only assume that either 1) the function keys (F-keys) need the Host Return key to work, or 2) this is a bug that was supposed to be fixed but wasn’t.

8 Comments :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!