Archive for the ‘Software’ Category

Firefox Sync

This week I have come to learn of Firefox Sync.  I now have all my bookmarks, password, history and preferences available on all the computers I use.  Similar to how Google Chrome syncs your favorites.  For more info:  http://www.mozilla.com/en-US/firefox/sync/

What Is Hyper-Threading?

Hyper-Threading is a technology included by Intel first in their Netburst line of parts. Hyper-Threaded processors present their individual processing cores to the system as if they are two processing cores. To use Intel’s parlance, that means that each physical core appears in the operating system as two logical cores. While the OS can distinguish between a system that has two logical cores (i.e. a single physical core with Hyper-Threading enabled) and two physical cores, applications cannot. It is up the the OS’s scheduler to choose if it wishes to use logical cores in the same manner as physical cores

Command of the day: shred

The shred command can be used for destroy files so that their contents are very difficult or even impossible to recover. The shred command accomplishes its destruction by repeatedly overwriting files with data patters designed to do maximum damage. Even the use of high-sensitivity data recovery methods and equipment make it difficult to recover files that have been shredded.

In Linux I often find myself using the ‘rm’ command to delete files, however this does not destroy the data it just destroys the index which lists the location of the file and makes the data blocks available for reuse. In short, a delete of the file does not remove the files and there are utilities that can read the blocks and get the data back. Such a tool is ‘testdisk’ which can image all the blogs on disk and recover deleted files.

Using ‘shred’

shred’s syntax is: shred [option(s) file(s) or device(s)

When using ‘shred’ without any options it will overwrite any file or device 25 times, which is generally sufficient to remove all traces of data. A device can be a partition or even an entire HDD, USB Key, etc.

Example: I would like to use shred to delete a file(s) and cause full destruction. By typing the following ‘shred filename1′ this will shred the file with the default setting of 25 times.

The default number of overwriting can be changed by using the -n option followed by an integer representing the desired number

The most reliable way to destroy data is to ‘shred’ an entire partition. For example, the following would destroy data on a unmounted SD Card: shred /dev/mmcblk0 thats if the device is plunged into this location. The location may be different so please be sure to use the correct one for your situation.

End Notes:

Even after overwriting data, it is possible for someone to take the HDD or other storage device to a specialized data recovery laboratory and use highly sensitive (and expensive) equipment to search for the faint traces of the original data, which can be relatively easy to detect if it has been overwritten only one or a few times. Thus, the best way to remove data on a HDD irretrievably is to physically destroy the media on which it is stored, such as by opening the drive and rubbing the individual platters with sandpaper. However, as this can be tedious, shred provides a alternative that can be almost as good but which requires much less effort and cost.

Mounting a remote file system using ssh (sshfs)

For some time I have always used tools such as scp sftp to copy files between Linux based systems. Until the growing need to have this process simplified.  I recently fell in love with Linux all over again with the new release of Ubuntu.  I always had known it was possible but never had the direct need to mount ssh file systems remotely.  This is where some Google searching and SSHFS and FUSE came into play on my home systems.

So what are some things I found out?  Well for one; as long as I have SSH access to a remote system I can use SSHGS to mount and use the remote directories as if they were on my local system.  SSHGS require no special software on the remote host so this is good in a hosted situation where you have no control over what gets installed.

This is where I give you the * filler * info on SSHFS.

SSHFS is built upon the FUSE user-space file-system framework project.  FUSE allows user-space software; in my case SSH to present a file-system that is virtually interfaced to the end use.  SSHFS connect to the remote system and does all the necessary operations to provide the look and feel of a regular file-system.

So now what?

First we need to start off by installing sshfs if not already installed.  I am using Ubuntu like I had mentioned above so by typing sudo apt-get install sshfs that installs all I need and supporting requirement.

The fun part.

Create a local directory where you want the files mounted.  This process is similar to mount smb shares from another system.  In my example I will be mounting the directory /home on the remote server to a local path on my system:

“sudo mkdir /mnt/remotehome1”

“sudo sshfs jermsmit.com:/home /mnt/remotehome1

You can also change the owner of the new directory by typing chown ‘yourusername’ /mnt/remotehome1

Please note that the /mnt/remotehome1 directory must exist and be owned by you, so keep in mind when you make (for example) /mnt/remotehome1/ you should assign permissions to your user so that you may access it.

To unmounts the directory, you can use the command fusermount –u.  Example fusermount –u /mnt/remotehome1.  If you get a message about the path being in use make sure that you have change directory out of this path and try again.

That’s about it.  Very clean and simple, and next time I hope to write about setting this up in such a way its auto mounted on startup (aka persistent), but for now this gets the job done.

UAC from Windows 7 Command Line

UAC (User Account Control) is the most obnoxious, nagging  windows that will drive you crazy and frustrate you while using Windows 7 or Vista.

One way to stop being annoyed is to disable it.  However doing so will make your computer less secure.  I in no way recommend anyone disable UAC, but I will provide a quick way to disable and enable via the command line.

Disable UAC

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Enable UAC

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

Both require a reboot to take effect.

Return top