Advertisements

Archive for August, 2011

Problems accessing Samba SMB shares on Mac OS X Snow Leopard

Problem:

In OS X Snow Leopard, you may experience problems accessing a SMB network share using either of the following methods:

Go > Network;

or, using Finder’s pane, under Shared;

.. and clicking ‘Connect As’ to log in.

You get the following error message:

You entered an invalid username or password. Please try again.

Workaround:

In Safari, type the following into the address bar:

smb://servername:139

Where servername is the server name of your SMB server.

Example:

smb://diskstation:139

a dialog box will appear, prompting you to log in. This should succeed and you will be prompted with a list of your devices shares. Selecting a share will mount it and display the contents.

Enjoy.

Advertisements

Leave a comment

Converting a Mac DMG image to ISO in Ubuntu

Mac DMG images are practically unusable in a non-Mac system in that format. They can be converted to ISO images in Ubuntu for easy burning, mounting, or use in a virtual machine.

Once you have the DMG file you want to convert to an ISO file, you need to install dmg2img

sudo apt-get install dmg2img

Now, assuming the DMG file you want to convert is image.dmg, run the following command:

dmg2img image.dmg

After a few minutes or processing, your DMG will be converted to an IMG file in ISO format (image.img). If you need the ISO extension, simply rename the file:

mv image.img image.iso

Note: IMG files created by Nero are NOT in ISO format and cannot simply be renamed. If you want to convert a Nero IMG file to ISO, use the ubuntu utility nrg2iso, but it’s not required above.

Leave a comment

1&1 DNS Settings Unmodifiable

For 1&1 users who are trying to change their DNS settings and finding them unmodifiable.

  • Go into the 1&1 control panel
  • Go to the Administration page
  • Click on “Manage Domains”.
  • Choose one of the domains in the Domain Overview list.
  • Click on the down arrow on the DNS Settings option.
  • Click on “Edit DNS” when the menu drops down. Now you should be on the DNS Settings screen.

If, Under Basic DNS Settings does it say “1&1 name server (unmodifiable)” -or- Under Advanced DNS Settings does it say “IP Address (A-Record) 1&1 IP Address (Unmodifiable)” ?

You won’t be able to modify any of these DNS settings if you’ve ever used the WebsiteBuilder tool on that domain. Simply go to your account and delete the WebsiteBuilder service from your account. You should now be able to edit the DNS settings.

Leave a comment

How to create an unfiltered input type in Drupal 7

The default input types in Drupal strip out unapproved HTML tags and optionally format links with tags. If you’re creating a block for some more advanced purpose, such as the insertion of JavaScript or other HTML that you don’t want stripped, you will likely want an input type with no filters.

Note that an unfiltered input type will not support PHP; you must enable the PHP module for this. Once you enable the PHP module, it will create an input type specifically for PHP. The PHP block will allow unfiltered HTML, but may present an unnecessary security risk.

To create an unfiltered input type in Drupal 7, do this:

Go to Configuration > Content Authoring > Text Formats

You should see the default text formats appear.

Click add new text format and give your new text format a name, such as “Unfiltered HTML.” Choose the roles that will be allowed access to this input type. Be aware that allowing untrusted users access to an unfiltered input type may have security implications. Don’t check anything under Enabled Filters. Click Save Configuration.

That’s it. Your input type is now ready for use.

Now, if you want to create a block with unfiltered content, such as the display of JavaScript code, simply choose “Unfiltered HTML” as the input type of the block.

,

Leave a comment

Cleaning up after PhotoRec – Linux Edition

A friend of mine accidentally formatted her 2TB backup drive and brought it to me to see what I could do. PhotoRec was the only tool that would give more than a hint of recoverable data from my Linux-based laptop. After letting it run for several hours, I had a mess: PhotoRec recovered over 230,000 files,  and spread them out over 430 directories!

Finding and sorting them by hand was obviously out of the question as it would take way too long. I took a hint from another recovery program I had [unsuccessfully] tried, and thought of sorting them into directories based on their file extensions. I.e. .jpg into ‘jpg’, .doc into ‘doc’, etc.

However, since I was working with the large number of files and directories, I had to take this a bit further. This will sort files into directory names like ‘jpg.1’, ‘jpg.2’, etc. These are numbered to prevent putting too many files in a single directory and killing system performance :)

I came up with the following bash script for use on Linux systems. A word of caution is due: This script does very little error checking, though the commands are quite sensible and I ran it as-is with fine results. I’m not responsible for unanticipated results.

UPDATE: This has moved to github, here.

Questions, comments, and feedback are welcome. Please leave them in the comments section below. Thank you!

, , , ,

Leave a comment

Does your anti-virus product really work?

Odds are you installed an anti-virus product on your PC or mobile device to protect you from viruses and the like… but, does it work? Or is it providing you a false sense of security?

Here’s how to safely test your antivirus program, and a little background about the process.

The EICAR Standard Anti-Virus Test File is a non-destructive test file that was developed for this purpose: To safely test anti-virus programs for proper operation, without having to actually expose the system to a destructive program. All anti-virus programs should detect to, and respond to, EICAR as a virus. However, is it not malicious.

So how to test?

DOS/Windows (32 bit only) users:

You can download the EICAR test file directly from EICAR here and run it. Your anti-virus should immediately react. If you have trouble deleting the test file because your anti-virus program is blocking access to it, temporarily disable your antivirus program, then delete the file. Don’t forget to reactivate your program after. You can only run the .com file on non-64-bit systems due to the 16-bit limitation.
64-bit: Download the file as above. Since you cannot run it, you won’t be able to test your real-time protection. However, your anti-virus product should still detect it if you do a manual scan. If it does not, it may be because the 16-bit code doesn’t apply and won’t run anyway. So a failure to detect EICAR on 64-bit Windows may not indicate lack of protection.

Android:

Yes, there’s malware on Android. Yes, there’s anti-virus and anti-malware programs for Android. Yes, if you’re running one you should test it. Search Market for ‘EICAR’ and download EICAR Anti-Virus Test, or use this Market link.

 

,

Leave a comment

How to enable mp3 support in K3b

By default, K3b does not support MP3 file sources for audio CD burning. You can install support for MP3 by running the following command:

sudo apt-get install libk3b6-extracodecs

This is current as of Ubuntu 11.04

,

Leave a comment

Easy Sprint Galaxy Tab 7 Rooting

There’s a very easy method for rooting the Sprint Galaxy Tab 7″. I don’t know whether it works on the 10.1 or not, as I only have the 7″.

REQUIRES:
* A decent Windows computer (XP or newer) – Virtual machine alone will not work
* Your Tab USB cable
* About 15 minutes or so
* Ability to follow instructions

NOTE: Build number will NOT show “QUENS.GINGERBREAD.EF17” per the screenshot, it will show “GINGERBREAD.EF17”. Verify success by the presence of ‘Superuser’ in applications and try downloading Titanium Backup (or any other root-required application, such as Root Checker) from Market and verify you get a prompt for Superuser access.

Runs smoothly with no issues.

Link: http://forum.xda-developers.com/showthread.php?t=1161033

, ,

Leave a comment

Google Street View camera car spotted

If you’ve ever wondered what a Google Street View camera car looks like, this is it:

Leave a comment

How to generate a unique time-based hash in PHP

This PHP code is especially handy if you want to generate a time-based hash for some security purpose. You can adjust the code to generate hashes every month, every day, or down to every second if that’s what you want. These can be used to generate automatically-changing passwords, password salts, time-based challenges, etc.

NOTE: This is example code only and shouldn’t be copy/pasted for use in a production environment. Instead, modify the code below and change the hash function, the date string, and maybe add your own customizations. See the PHP date() and hash() manual pages for reference.

<?php
// length of hash to generate, up to the output length of the hash function used
$length = 12;
// The following should retrieve the date down to your desired resolution.
// If you want a daily code, retrieve only the date-specific parts
// For hourly resolution, retrieve the date and hour, but no minute parts
$today = date("m.d.y"); // e.g. "03.10.01"
$out = substr(hash('md5', $today), 0, $length); // Hash it
echo "$out";
?>

I’m sure there are plenty of other ways, but this is a code snippet that I used. Feel free to share your thoughts on this in the comments below, thanks!

Leave a comment