Posts Tagged ‘linux’

Resolving Sansa Media Player issues under Ubuntu 9.04

Saturday, April 25th, 2009

Even tho Ubuntu 9.04 (Jaunty Jackalope) was released only a few days ago, I’ve been running it without issue on most of my systems since alpha (What can I say, I like to live on the edge). Well, nearly without issue.

When plugging in my Sansa e260 into either my Thinkpad or desktop systems the Sansa would not mount in either mode.

Tailing /var/log/syslog/ (tail -f /var/log/syslog) revealed this;
Apr 25 10:04:34 hkb-jaunty kernel: [ 874.500098] usb 1-5: new high speed USB device using ehci_hcd and address 4
Apr 25 10:04:34 hkb-jaunty kernel: [ 874.556334] hub 1-0:1.0: unable to enumerate USB device on port 5
Apr 25 10:04:43 hkb-jaunty kernel: [ 882.804067] usb 1-5: new high speed USB device using ehci_hcd and address 5
Apr 25 10:04:43 hkb-jaunty kernel: [ 883.667500] usb 1-5: configuration #128 chosen from 1 choice
Apr 25 10:04:43 hkb-jaunty kernel: [ 883.689289] scsi7 : SCSI emulation for USB Mass Storage devices
Apr 25 10:04:43 hkb-jaunty kernel: [ 883.689653] usb-storage: device found at 5
Apr 25 10:04:43 hkb-jaunty kernel: [ 883.689657] usb-storage: waiting for device to settle before scanning

After some digging around, I found a bug report at https://bugs.launchpad.net/ubuntu/+bug/345916 points to the modification of a file under /usr/share/hal/fdi/preprobe/10osvendor/. Looks easy enough…

  1. Open a Terminal window (Accessories > Terminal)
  2. cd /usr/share/hal/fdi/preprobe/10osvendor/
  3. sudo cp 20-libgphoto2.fdi 20-libgphoto2.fdi.backup
  4. sudo nano 20-libgphoto2.fdi
  5. Remove all entries between line 6633 and line 6764
    You can use the shortcut Ctrl-k to cut lines.  Make sure the <match> tags are correctly nested and closed otherwise we’ll get all sorts of weird errors.
  6. Use Ctrl-x to save and exit nano

Now reconnect the Sansa.  If you’re still tailing syslog then you should see something like this;
Apr 25 10:10:25 hkb-jaunty kernel: [ 1225.396100] usb 1-5: new high speed USB device using ehci_hcd and address 6
Apr 25 10:10:25 hkb-jaunty kernel: [ 1225.452256] hub 1-0:1.0: unable to enumerate USB device on port 5
Apr 25 10:10:34 hkb-jaunty kernel: [ 1233.980091] usb 1-5: new high speed USB device using ehci_hcd and address 7
Apr 25 10:10:35 hkb-jaunty kernel: [ 1234.847610] usb 1-5: configuration #128 chosen from 1 choice
Apr 25 10:10:35 hkb-jaunty kernel: [ 1234.867573] scsi8 : SCSI emulation for USB Mass Storage devices
Apr 25 10:10:35 hkb-jaunty kernel: [ 1234.867934] usb-storage: device found at 7
Apr 25 10:10:35 hkb-jaunty kernel: [ 1234.867939] usb-storage: waiting for device to settle before scanning
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.864675] usb-storage: device scan complete
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.865794] scsi 8:0:0:0: Direct-Access SanDisk Sansa e260 PQ: 0 ANSI: 0
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.866774] scsi 8:0:0:1: Direct-Access SanDisk Sansa e260 PQ: 0 ANSI: 0
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.870983] sd 8:0:0:0: [sdb] 7854080 512-byte hardware sectors: (4.02 GB/3.74 GiB)
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.871834] sd 8:0:0:0: [sdb] Write Protect is off
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.871840] sd 8:0:0:0: [sdb] Mode Sense: 45 00 00 00
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.871846] sd 8:0:0:0: [sdb] Assuming drive cache: write through
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.874596] sd 8:0:0:0: [sdb] 7854080 512-byte hardware sectors: (4.02 GB/3.74 GiB)
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.875469] sd 8:0:0:0: [sdb] Write Protect is off
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.875474] sd 8:0:0:0: [sdb] Mode Sense: 45 00 00 00
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.875479] sd 8:0:0:0: [sdb] Assuming drive cache: write through
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.875485] sdb: sdb1 sdb2
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.880717] sd 8:0:0:0: [sdb] Attached SCSI removable disk
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.880842] sd 8:0:0:0: Attached scsi generic sg2 type 0
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.883016] sd 8:0:0:1: [sdc] Attached SCSI removable disk
Apr 25 10:10:40 hkb-jaunty kernel: [ 1239.883120] sd 8:0:0:1: Attached scsi generic sg3 type 0
Apr 25 10:10:40 hkb-jaunty hald: mounted /dev/sdb1 on behalf of uid 1000

After preforming updates, you might have to re-edit the 20-libgphoto2.fdi file, as your changes may be over written by newer packages.

As always, your mileage may vary.

Related Links:

Authentication issues with netqmail-1.06, SMTP-AUTH/TLS patches and vpopmail-5.4.25

Monday, November 24th, 2008

I was recently consolidating several independent web servers into a single server.  Part of the migration duties included the installation and configuration of an email system.  I have a particular dislike for Sendmail(TM) centering around it’s monolithic architecture, it’s security record and it’s configuration.  Qmail is very flexible due to it’s modular design, it carries a security guarantee that has yet to be claimed, and it’s configuration is preformed with a few plain text files.

Regardless, after applying Bill’s patches to netqmail-1.06 and then building, installing and starting netqmail, then compiling and installing vpopmail-5.4.25, I found that all SMTP-AUTH attempts would fail producing either “Could not write to pipe” messages, or messages similar to the following;

Nov 23 12:28:30 <host> vpopmail[2912]: vchkpw-smtp: vpopmail user not found <user>@<user>.com:<ip.with.held>
Nov 23 12:28:36 <host> vpopmail[2912]: vchkpw-smtp: vpopmail user not found <user>@<user>.com:<ip.with.held>

Very odd, as created the user, and had verified proper permissions under ~vpopmail.  In the end, I found that I had to apply the sticky bit to the ~vpopmail/bin/vchkpw binary.  Like this;

chown vpopmail:vchkpw ~vpopmail/bin/vchkpw
chmod 4711 ~vpopmail/bin/vchkpw
chmod u+s ~vpopmail/bin/vchkpw

Regardless of user running the vchkpw binary, they will always have permissions to read the proper .cdb domain files.  Easy.

Maybe at a later time I will write a no-nonsense netqmail installation guide.

Unable to access the internet properly after upgrade to Ubuntu 8.10

Tuesday, September 30th, 2008

Just upgraded to Ubuntu 8.10 last night. Everything went smoothly, however after rebooting I found I couldn’t get Firefox to load any websites. Sometimes the page would begin to load, then hang, and eventually fail the pageload. I also found I couldn’t access any repositories via apt-get.

While I’m cannot be sure if this value would have changed, I resolved this issue with the following command.

kurth@theship:~$ sudo /sbin/ifconfig eth0 mtu 1492

The default value is 1500b, which is too large for PPPoE payload. 1492b is smaller and therefore fits within the payload area.

Edit your /etc/network/interfaces file and add the following;

mtu 1492

The setting will now remain between reboots.

Notes: Prevent MySQL from listening on network interfaces.

Thursday, September 18th, 2008

I’m using CentOS 5.2, YMMV

In /etc/my.cnf under [mysqld] add

skip_networking

Restart mysqld.

Hardening CentOS

Tuesday, August 5th, 2008

These links come from the focus-linux@securityfocus.com mailing list and are related to hardening both CentOS and Redhat Enterprise Linux (RHEL).