buy hypertropin

GGTSdotNET

The notes of a madman

Archive for the ‘Linux’ Category

Wiping disks using DD

Posted by grigsby on November 29, 2012

Quick note to self.

To do a quick disk wipe:

dd if=/dev/zero of=/dev/sdl bs=8M

This could be performed multiple times using a for loop. For a more secure wipe, use /dev/random, but this takes FOREVER. For a even more secure wipe, us a 1/2″ drill bit.

To keep tabs on how the DD operation is progressing, us this:

watch -n 60 killall -USR1 dd

Posted by grigsby on September 25, 2012

After a recent nuke and pave on my Ubuntu 12.04 to attempt to deal with random Unity crashes I was met with a challange. I had kept all of my sources.list.d/* ppa entries but after attempting an apt-get update all I got was errors. Lots of errors just like this one:


W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXXXXXXXXXXXXX

I had written a script a while ago to find all of the missing keys, download them, and install them, but I lost it in the upgrade. Instead of reinventing the wheel, again, I started searching and I find that somebody else had created a simlar script, but was smarter than I was as they actually published it.

So….


sudo apt-add-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install launchpad-getkeys

Once the installation is complete, run this:

sudo launchpad-getkeys

And no more missing keys. A big thanks to Alin Andrei for having the forethought to publish his work when I didn’t…

Thunderbird no longer opens links

Posted by grigsby on April 17, 2010

I recently upgraded my Ubuntu Karmic (9.10) install to use Thunderbird 3.X and Firefox 3.6.X. Somewhere in my mucking about I broke the open link in browser option. Here’s how to fix it:

Brute force method:

1) Close TB.
2) mv ~/.*thunderbird/*default*/mimeTypes.rdf ~/.*thunderbird/*default*/mimeTypes.rdf.old
3) Launch TB and click a link. TB should now ask how you want to handle http links.
4) Enter the path to FF (or the browser of your choice). Typically /usr/bin/firefox is a link to the current browser.
5) You're done.

More elegant (weapon for a more elegant time…) method:

1) Edit - Preferences - Attachments
2) http -> Use Other -> /usr/bin/firefox
3) repeate for https.

Cursor (arrow) Keys not working in Ubuntu Terminal Server Client

Posted by grigsby on March 13, 2010

Running Ubuntu 9.04, 32bit, I noticed that the cursor (arrow) keys were not functioning on Terminal Server Client which I use constantly to connect to XP machines for work. I use the Terminal Server Client Applet to easily access the machines I’m working on and it had worked in the past. I found, after some digging, that the keyboard setting had gotten changed for all of the saved machines from en-us to us. So, the fix is as follows:

  1. Open the Terminal Server Client
  2. Enter the machine details
  3. Select the Local Resources tab
  4. set the keyboard to en-us
  5. Save the session to the Quick Connect Profile

The cursor (arrow) keys not work as expected.

Deluge torrent client broken after Jaunty upgrade

Posted by grigsby on June 22, 2009

Just finally upgraded on of my desktop systems to Ubuntu Jaunty 9.04. Well, I upgraded it again. After the initial upgrade I was getting continuous hangs (scroll and caps lock flashing). At the time I didn’t have the energy or time to resolve the issue, so I nuked and went back to 8.10 on just this system. Well, today, I finally resolved the issue (long story, probably a future post).

Anyway, after the upgrade completed, and I beat Xorg into line, I went to restart my Fedora 11 torrent so I can do some testing with that. And, something else broke: My favorite torrent client Deluge. Launching the client would result in a white window with no text (i.e. complete unresponsive window). After some digging I found a cryptic post about a libtorrent-rasterbar update that seems to be the culprit. The fix, is even easer:


sudo apt-get install libtorrent-rasterbar4

As soon as I got libtorrent-rasterbar version 0.14.4-2 installed, deluge was happy again.

Reference: http://dev.deluge-torrent.org/ticket/953

Joining a Windows 7 system to a Samba domain

Posted by grigsby on May 17, 2009

UPDATE: I would strongly recommend reading the following link prior to mucking about int he windows 7 registry. The changes required vary with different versions of Samba. You have been warned!


http://wiki.samba.org/index.php/Windows7

I had a client request a Windows 7 RC1 system so that they could test their product against the latest candidate from Redmond. Their network is made up of a mix of Windows clients on Linux/Samba servers. Setting up the new client was fairly easy, but, as expected, Windows 7 refused to join to a the Samba domain stating that the domain in question was not available. Having gone through something similar when we finally added Vista clients I expected to have to update Samba to get this to work. Turns out you have to add two reg keys as well. Since it took me a fair bit of search to find this, I thought I’d document the required changes here, if for no other reason to save myself the trouble when I went to do it again…

  1. First you need to be running Samba v3.3.4 or later. Earlier versions have been reported to work, but there are some issues. Since this version is not available in the OS repos (CentOS) I got my copy from the Samba Enterprise site. They carry packages in RHEL, SLES, and Debian flavors and I have been using them for some time.
  2. Next the Windows 7 client needs to have two registry keys added.

    HKLMSystemCurrentControlSetServicesLanmanWorkstationParameters
    DWORD DomainCompatibilityMode = 1
    DWORD DNSNameResolutionRequired = 0
  3. The following key needs to be changed or you will receive an error when trying to login using a domain accout of “The trust relationship between this workstation and the primary domain failed.”

    HKLMSYSTEMCurrentControlSetservicesNetlogonParameters
    RequireStrongKey = 0

Once these changes were made I was able to join the domain. I did receive an error on the join as shown in the following image, but the system seems to be working fine.

domainjoinerror

I’m assuming this will be resolved in future releases. Hope this helps save somebody at least a few minutes…

Read the rest of this entry »

Samba error: “Failed to verify incoming ticket!”

Posted by grigsby on March 8, 2009

I started having an issue with one of my samba servers. This particular server uses an AD controller for authentication. Today it stopped authenticating. A brief search found this error in the log.client_name log.


[2009/03/08 18:28:16, 1, pid=6667, effective(0, 0), real(0, 0)] smbd/sesssetup.c:reply_spnego_kerberos(173)
Failed to verify incoming ticket!

After a bit of research and more than a little digging in the source code (FLOSS FTW!!!) I found that this error message is related to a time difference between the client and server. This lead me to the fact that my NTP client was pointing to a server that had been removed from the network some time ago. A change to the NTP client and a forced time change and BAM, Samba is working again.

UPDATE: I forced the time change with the ntpdate command but I’ve just been informed that I could have used the AD controller itself using the following:

net time set -S ad_controller_name_OR_IP

Vista backup to Samba share

Posted by grigsby on February 15, 2009

So I recently had to deploy a Vista machine to a customer’s network. Till now we had only had one vista box stuck in corner for testing. Now is has been decided that we need a couple of Vista boxes on peoples desktops. The logic goes that we won’t find as many problems if people aren’t using it on a regular basis. (I really feel for the guy that got suck with the Vista box. I mean the box is nice, but Vista just sucks. Eggs. Really old eggs.)

So the initial setup of the box was normal for Vista. I spent most of my time trying to figure out where they hide or renamed options… Typical, right? So the box gets deployed and I migrate the user’s data to the system. Then I got to setup backup for his email. We typically just using Windows backup to backup email and a a few other files. Everything else is stored in on the server. So I got to start the backup process and I get this:


Windows Backup
File Backup could not save your automatic backup settings for thefollowing reason:
Cannot create a file when that file already exists. (0x800700B7)
Please try again

Or something similar. A quick swipe at google and I see that it’s a Samba/Vista issue. Something changed in SMB2 and the only thing that seems affected is Vista Backup. Figures. So I schedule server downtime for the weekend to update Samba as according to the Samba Bugzilla site, this is fixed in a slightly later release.

Sunday afternoon comes along and here I am. I install the update, restart Samba and…. Frack. Error. Fast forward 3 hours. After I start reading comments on the Bugzilla site in desperation I find that the issue is related to ACLs that Vista backup is trying to set on the directory. Wait, does ext3 support ACLs? /me quick google…. Ah, you have to pass the file system an option to enable ACL support. So, long story short… If you want Vista backup to work, you have to 3.0.25+ of Samba, and you have to have ACL support enabled on your file system. The magic incantation is simply spec’ing ‘acl’ in the mount command, like this:


LABEL=/work /work ext3 acl 1 2

I hope this saves at least one person the hours I’ve just wasted.

For reference:
https://bugzilla.samba.org/show_bug.cgi?id=4308
https://bugzilla.samba.org/show_bug.cgi?id=5306
https://bugzilla.samba.org/show_bug.cgi?id=5306
http://social.answers.microsoft.com/Forums/en-US/vistaprograms/thread/d91d7785-9a00-4b26-9ae3-ae35b0d9317b/
http://www.samba.org/samba/history/samba-3.0.25.html

GPG error while doing a aptitude update

Posted by grigsby on January 31, 2009

There have been a number of new keys issued for PPA on the Launchpad site. If you are getting an error similar to the following, then here is how you fix it.

W: GPG error: http://ppa.launchpad.net intrepid Release: The following signatures couldn't be verified because the public key is not available:
NO_PUBKEY 60D11217247D1CFF
W: You may want to run apt-get update to correct these problems

Execute the following command replacing with the alpha-numeric string after the NO_PUBKEY message. In the example above the key was 60D11217247D1CFF

gpg --keyserver subkeys.pgp.net --recv _missing key_

Followed by this command:

gpg --export --armor _missing key_ | sudo apt-key add -

This will download the missing public keys and add them to the apt key repo.

Note: There may be multiple keys that are missing. Simply repeat for each missing key.

UPDATE: ‘blackgr’ on the ubuntuforums released a script to automate this. If you have an account there and are missing a number of keys, this can speed things up considerably. This script can be found on post #43 on this page: http://ubuntuforums.org/showthread.php?t=1047743&page=5

UPDATE 2: Here are details about what is happening. http://news.launchpad.net/ppa/adding-a-ppas-key-to-ubuntu

twhirl on Linux

Posted by grigsby on December 18, 2008

EDIT: Added a couple of other things I found that *might* be necessary. Let me know if people are running into stuff that still doesn’t work…

The latest version of twhirl (0.8.7) came out last week to deal with changes in the twitter API. All well and good. Until I tried to update twhirl on my laptop, and my desktop. What’s this? It requires Adobe Air 1.5? But Air 1.5 isn’t available on Linux yet… Sad is me, until today. Today Adobe moved Adobe Air from the Beta column on Linux to the full release with version 1.5. All is good. Except for getting the new version installed and getting twhirl working is a bit of a chore. After a bit of googling I have figured out the secret sauce required to get it to work. And I share this secret sauce with you here. (this was done on Ubuntu 8.10 but the process should be similar on any flavor of Linux just substitute the appropriate package management commands and you should be golden).

Start by downloading Adobe Air 1.5 and twhirl 0.8.7 and save them somewhere handy. I choose the Desktop.


sudo aptitude remove adobeair1.0 adobeair-enu
sudo aptitude search twhirl (note the package name)
sudo aptitude remove ${name of twhirl package from above}
sudo rm -Rf /var/opt/Adobe AIR/ /opt/Adobe Air/
rm -Rf ~/.adobe/ ~/.macromedia/
sudo rm -Rf /root/.adobe /root/.macromedia
chmod +x ~/Desktop/AdobeAIRInstaller.bin
~/Desktop/AdobeAIRInstaller.bin
Install twhirl-0.8.7.air

That’s it. You should now be ready to share your uber witty comments with the rest of the world.

Update: Somebody has claimed that there was a typo in this post. That, of course, is a blatant falsehood and the person claiming this should be ashamed.