Friday, July 4, 2008

Firefox 3, Making awesome software and world records

If you haven't noticed (I don't think any one hasn't), Firefox 3 has been out for just over 2 weeks now (June 17, 2008). On the release day they also had a push to create a Guinness World Record for the most software downloaded in one day and despite some initial issues, they (we) did it!

Thanks to the support of the always amazing Mozilla community, we now hold a Guinness World Record for the most software downloaded in 24 hours. From 18:16 UTC on June 17, 2008 to 18:16 UTC on June 18, 2008, 8,002,530 people downloaded Firefox 3 and are now enjoying a safer, smarter and better Web.
I've been running some of the betas for a while now and despite some crashes in those pre-releases, this is definitely the best release yet. It feels faster, looks better, uses less memory and the awesome bar truly is awesome. If you have been running Ubuntu 8.04, you too have been running beta 5. So go get your download day certificate and enjoy the new browser.

Wow, I haven't posted in over a month!

Sorry to anyone (if there is anyone) who follows this blog regularly. I haven't posted in over a month now for a lot of very good reasons.

First, my hard drive crashed to the point that it was completely unreadable. I ran SpinRite on the drive for about 2 days straight and it was only 0.002% done scanning the drive with nothing recovered. Ouch! I had some backups but I realize I need a better system. Dual booting makes it harder to backup too because I have data on separate partitions and worse 2 different operating systems that need to perform backups but do it differently. Before the crash I was spenging most of my time in Linux but only had a backup system in place on Windows. Hopefully I will have more on that later when I find a solution.

A little over a week later, I went on vacation for just over 2 weeks (Italy and the Normandy region of France). I blogged some about my travels but saw very little Linux and Open Source related to blog about. I did see a few things I might touch on later but nothing super exciting.

Now that I have been back for a little over a week, I am finally starting to catch up and get my computer restored. I still want to finish blogging about my trip and in a few more weeks I will be moving and I still have to find a place to live. So... I've got some ideas for some new posts and hopefully I can get to writing them soon but I am not sure.

Enough of the personal updates, now back to the regular content...

Monday, June 2, 2008

cli_negprot: SMB signing is mandatory and we have disabled it.

I am trying to mount a Windows share on a a 2003 server machine with an old Fedora Core 1 box. Mounting the same share using the same command on Ubuntu 8.04 worked (Samba 3.0.28a) but not on Fedora (Samba 3.0.7-2.FC1). The Fedora box also was able to mount a share on Windows XP without any problems. The error I kept getting was cli_negprot: SMB signing is mandatory and we have disabled it.

Looking around some I found that this is due to a security policy in Windows 2003 Server that forces the connections to be encrypted. To disable it, on the Win2k3 box go to Administrative Tools -> Domain Controller Security Policy. Then select Local Policies -> Security Options and find the policy Microsoft network server: Digitally sign communications (always). Disable that. (I also had to disable: Microsoft network server: Digitally sign communications (if client agrees) to keep from getting a Permission denied). You will then you will want to reload the policy with 'gpupdate'.


After that though, I got another error message: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid share name) That message means that I am trying to mount a directory inside of the share (which I am, and which works on the newer versions of Samba). This fix for that is to just mount the share and change your path references (or upgrade).

Instead of:
mount -t smbfs -o username=USER,password=PASS //HOST/SHARE/DIR /mnt/DEST/

Use:
mount -t smbfs -o username=USER,password=PASS //HOST/SHARE /mnt/DEST/

and then change your usage to always change to the DIR.

Friday, May 30, 2008

Setup multiple IP addresses on Ubuntu

I'm working on migrating a server again today and we decided that we want to put some of the services on 1 IP and the others on another so if we ever need to move one set of services over the IP can follow. This is the machine that is running Ubuntu 8.04 Server.

It turns out this is a pretty simple thing to do. First, edit your interfaces file:

sudo nano -w /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

Then add in a few new lines below the eth0 section to create a new virtual interface:
auto eth0:0
iface eth0:0 inet static
address 10.10.10.200
netmask 255.255.255.0
Then restart your networking:

$ sudo /etc/init.d/networking restart

And there you have it, your new virtual interface with your new IP.

$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1d:09:15:74:af
inet addr:10.10.10.122 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::21d:9ff:fe15:74af/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9780 (9.5 KB) TX bytes:5388 (5.2 KB)
Interrupt:17

eth0:0 Link encap:Ethernet HWaddr 00:1d:09:15:74:af
inet addr:10.10.10.200 Bcast:10.10.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:38081 errors:0 dropped:0 overruns:0 frame:0
TX packets:38081 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1614360 (1.5 MB) TX bytes:1614360 (1.5 MB)

Thanks go to NukeSilo.com for getting me started and the Debian guide on Network configuration for all the details.

Tuesday, May 20, 2008

File modification dates changed in Ubuntu 8.04 on copy or move

Before upgrading from Ubuntu 7.10 to 8.04, I had the annoying problem of file modification dates getting changed when copying files to an NTFS file system. I also found that the problem was fixed in a newer version of ntfs-3g and all I had to do was get the package from the Ubuntu backports repository. Yipee!

But now I am running Ubuntu 8.04 and the problem has returned just in a new and nastier form. Now file modification dates are always updated in any move or copy, including ext3 to ext3! I did find that I could get around this problem when copying from the command line with cp using the -p switch to "preserve the specified attributes (default: mode, ownership, timestamps), if possible additional attributes: context, links, all". That didn't work for me when copying to an ntfs partition though. I got an error message: cp: preserving times for `/path/My Documents in Windows/testfile.zip': Operation not permitted

I could (and did) use sudo to make it work on ntfs though. I am glad there is a work around but I really do not want to have to drop to a command line every time I want to move or copy a file that I want the modification date preserved. I want to use Nautilus to drag and drop things!

I knew from my previous issue with ntfs that the copy command doesn't preserve the modification date by default but copying in Nautilus did and now it doesn't. There was a major change from 7.10 to 8.04 with the file system though. GNOME now uses GVFS instead of GnoneVFS (confusing similar names I know). And from my research, it looks like that is the problem. There are bug reports here (Ubuntu) and here (GNOME). Now let's hope it gets fixed for 8.04 and soon! Until then I guess I will be dropping to the command line to move my photos around, argh!

Friday, May 16, 2008

Weird sound issues on Ubuntu 8.04, only one speaker or no sound at all

Now that I have upgraded to Ubuntu 8.04 I am utilizing PulseAudio instead of esd so the audio subsystem should be much better right? According to the Hardy release notes, PulseAudio

... makes it possible to mix audio from multiple applications together, assign audio from individual applications to specific sound cards, adjust volume levels of each individual application, and perform advanced operations on audio streams such as transferring the audio to another computer or changing sample formats and channel counts.
That sounds great. Only thing is it has been doing some strange things. Occasionally I lose sound on some or all applications. I haven't exhaustively tried to fix this problem yet but so far restarting has been the only solution.

I also just recently had a problem where only my left speaker was giving me any output. Fortunately muting and unmuting fixed that. I also read that adjusting the volume of both or more channels will also fix it.

Thursday, May 15, 2008

Backup and restore a MySQL database using mysqldump

Today I am working on migrating some web apps to a new server. The old server was running Fedora Core 1 (yeah, really old) and the new box is running Ubuntu 8.04 server edition. (This is the first time I have ever used the server version. A coworker chose the distribution. I think I would have gone with CentOS (a RHEL clone) but it will be nice to play with Ubuntu server too. I am not some super Ubuntu fanboy!)

So I am moving a MediaWiki 1.5 installation (you know, the software that runs Wikipedia) and upgrading it to 1.12. Copying the files and upgrading proved to be pretty simple and painless so far as I can tell but backing up and restoring the MySQL DB between version 3.23.58 and 5.0.51a got me a little concerned. I wanted to copy over an archive of the /var/lib/mysql/mediawiki db data directory and restart MySQL but that didn't work. It has in the past when going from a 3.x to a 4.x but I may have been pushing my luck even then too.

The best way I found to do this though is to use mysqldump. I have used this before but I always forget all the syntax (which is why I am writing this post). mysqldump will spit out SQL statements to recreate your database and reinsert all the data. The problem with that is you then have a gigantic .sql file that you have to import into your new database. That feels a lot less foolproof to me than if just copying the data directory would (had it worked).

Anyway, to backup your database with mysqldump, do this:

$ mysqldump -u root -p DBNAME > DBNAME.sql

And then to restore that, do this:

$ mysql -u root -p
mysql>CREATE DATABASE NEW_DBNAME;
mysql> \q
Bye
$ mysql -u root -p NEW_DBNAME <>

There you have it. There is also the option to use msqlhotcopy but I didn't bother with it.

Other tutorials and thoughts: