Posts Tagged ‘Mac’

MacFUSE/Macfusion Fix for Newer Macs

April 6th, 2011 Comments off

I recently picked  up one of the newly released MacBook Pros. If at all interested its awesome and FAST! Anyhow, I depend on MacFUSE and Macfusion daily to connect to various servers to knock out some development. Well, low and behold, mounting via SSH wasn’t working again (didn’t try FTP).

Now, I have another fix for MacFUSE/Macfusion here, but unfortunately this did not work for the latest release of MacFUSE on the new MacBooks.

So, after much searching and hunting I FINALLY came across the solution. There is an unofficial release of MacFUSE that lets all the goodness of Macfusion work with SSH. Apparently, there is an issue with MacFUSE and 64-bit kernels. Links and references below:

Build download: macfuse-core-10.5-2.1.9.dmg
Source download: macfuse-rebel-2.1.9-src.tar.bz2

Local build download: macfuse-core-10.5-2.1.9.dmg
Local source download: macfuse-rebel-2.1.9-src.tar.bz2

Solution source: Google Groups

Use MacFUSE and Macfusion SSH Mount

June 7th, 2009 No comments

AppleConstantly needing to edit files on remote systems? Find it tasking and annoying to edit localy and upload via ftp or ssh? Want to use your favorite editor to edit the files on the remote system rather than relying on the remote ‘vi’ or ‘nano’? MacFUSE and Macfusion can be a very powerful tool that can remedy all of the above. Below is a quick tutorial on how to setup and use it.

Download and install: MacFUSE and Macfusion

Enable Macfusion to run at startup and enable the menu item for quick mounting and remote file system access. Run Macfusion –> Preferences –> General –> ‘When I login, start’ –> ‘the macfusion agent’ and ‘the macfusion menu item’.

After reboot you will see a new Icon in your Menu Bar. If you select it, it will look something like…

Here you can see your various options and current mounted file systems. To setup a connection to a server, ‘Macfusion Menu Item’ –> ‘Open Configuration …’ –> ‘+’ –> Select connection type: SSHFS/FTPFS.

Configure the Connection Name, Hostname, User Name, Password.

Whalla! You should be all setup and able to edit and browse the files as if it was a local file system. Works great with your favorite editor (in this case TextMate).

TextMate tweak to prevent remote meta data files that can slowly make a mess out of the file system. Copy and paste the below line in the command line.

defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1

TextMate Manual on Saving Files. TextMate Manual

To view hidden files via finder add the following line on the command line.

defaults write AppleShowAllFiles TRUE
killall Finder

Original Source:

Password Access (Mac)

June 4th, 2009 No comments

A good friend of mine (Huggz) discovered a way of pulling your root password on your Mac. The oveall concept is that you are dumping the human readable text out of /dev/vm/sleepimage into another file in which you will find some interesting stuff including your root password. Kinda scary!

This takes a good while to dump all the content as that file can be upwards to 2GB. Search through the /var/vm/sleepimage-ascii file and you will see some goodies.

mac:~ me$ sudo su –
mac:~ root# cd /var/vm
mac:vm root# strings -n 4 sleepimage > sleepimage-ascii

I found my password all through this file. While most of these will be your password just on a line, and depending on your password, would be hard to know it was a password. However, one line I ran across blatenly says passwordXXXXusernameXXXX (line: 4186701 – for me). If you search throuh more you will see other lines that clearly displays hostname, username, password, home directory (lines: 7810286-7810293 – for me). If you keep digging you can find not only the login information for this particular machine but others for Samba mounts, ftp, web sites, etc. Good stuff!!!

There is also a more complete and detailed write up of other file dumps over at theInterW3bs.

Categories: Mac, Security Tags: , , , ,

Quick Lock Desktop – Mac

May 24th, 2009 No comments

One of my small peeves with a Mac is the lack of a quick utility or short-cut to lock your computer. So, I took it upon myself to make one out of the apps they already give us.

First off set your Mac to require a password when waking from the screen saver and disable  automatic logins. Apple –> System Preferences –> Security –> ‘Require password to wake this computer from sleep or screen saver’ & ‘Disable automatic login’.

You can download the one I created that ‘should’ work automatically after installing. If not or you want to get creative and make your own with your own icon or what have you, the instructions are below on what I did. You can also set a keyboard shortcut to the app for a keyboard style lock.

Pre-made Screen Saver/Lock App:
Download: MacDLock (MacDLock.tar – 280KB)

$> tar xvf MacDLock.tar
$> mv /Applications

That’s it! Now if you open your Applications folder you should be able to click the Lock icon for MacDLock and it will launch your screensaver. Upon wake, you will be prompted for you username and password that you set up to do earlier. I put a launch icon on the launch bar and setup a shortcut to the application to make for quick screen locking while I’m away. Enjoy!

Custom Screen Saver/Lock:

$> cp -r /System/Library/Frameworks/ScreenSaver.framework/Versions/A/\
Resources/ /Applications/

This will give you the standard ScreenSaver but located in your /Applications directory. You can also do it with a soft link such as this:

$> ln -s
Resources/ /Applications/

I did the first because I wanted to change out the icon to something more ‘cool’ or ‘secure’ looking (like a lock) without changing the actual

Changing out the Icon:

  1. Find the icon you’d like to use in either .png, .gif, .jpg format.
  2. I used this site to convert my image to an icon: iConvert
  3. Download your new .icns file.
  4. Copy your .icns file to the application directory.

$> cp ~/[Icon_FileName].icns /Applications/\

And there you go! You have your custom Screen Saver/Desktop Lock. If you notice any kind of bug in my above code please let me know. I took many other steps while originally doing this so hope they are in the right order and I’m not missing anything.

One of my projects when I have some free time is to setup a Python script or something that embeds an icon into the Menu Bar for quick locking. If this is already available or you feel I’ve recreated the wheel please let me know of the other apps that are out there that may already do this. Always interested in seeing what other have done. Thanks! And hope you enjoy!

Categories: Mac, Security Tags: , ,

SSH Proxy (how-to)

May 23rd, 2009 No comments

TerminalSSH Proxying is one of my every day tools. Sitting at work with a Barracuda firewall looking, snooping, and possibly blocking everything that I do. Hanging at a coffee shop when you see a suspicious person most likely snooping your information out of the air. In the first case I’m primarily just trying to get around a hurdle. In both cases I want my traffic encrypted and hidden from 3rd parties.

What is SSH Proxying?
This is a means of setting up a Secure Shell (SSH) and then piping your various web requests across this pipe or tunnel.

I’ve got 2 different SSH Proxies that I use daily.

Web Traffic – SSH Tunnel/Proxy:

ssh -CqN -D 8080 [username]@[hostname]

For above tunnel I’m using the following:

-D: bind port – in this case 8080 locally
-C: enables compression
-q: quiet mode (suppresses any warnings)
-N: don’t execute any remote commands

The -CqN are just some bells and whistles I use for the connection but not required. Please see below on configuring your browser to use the newly established SSH Tunnel.

Various other traffic (IRC, VNC, Torrent, etc…) – SSH Port Forwarding

ssh -L 6667:irc.[hostname]:6667 [username]@[hostname]

In this example, I’m binding a local port (-L 6667) to a remote boxes port (6667) through the server I have SSH’ed into. You can also add some of the bells and whistles from the web proxy to this one as well. Please see below for using this port forward with and IRC client.

Configuring the Browser:
The general idea (for Firefox) is to go to: Preferences –> Advanced –> Network –> Connection –> Settings. Select ‘Manual proxy configuration’. Set SOCKS Host: localhost Port: 8080. Click OK/Save and you should be good to go.

Here’s a screen shot of my settings:

Firefox SSH Proxy Config

Categories: Linux, Mac, Security, Unix Tags: , , , , , ,

bwm-ng (command line bandwidth monitor)

May 21st, 2009 No comments

bwm-ng is a great little command line bandwidth monitor. HUGE fan. Its available with most all distros so use your favorite package manager to add it. Works on all *nix distributions including the Mac too.

bwm-ng home page:

On the Mac it works great with a little application called GeekTool (will cover more later) with the following options:

/Users/derek/Applications/bwm-ng/bin/bwm-ng -o plain -c 1

Reset your lost OS X password

May 20th, 2009 Comments off

You gotta hate it when you have a brain fart or lapse of memory and you forget your login information. Unfortunately OS’s don’t have the ‘Forgot Password?’ – click here link to reset or have your password emailed to you. Well, for the Mac there is a work around.

All you need is to remember your username (you do remember that, right?) and then reboot your computer. From there it’s command line work:

Hold Apple+S when booting to enter single user mode
#sh /etc/rc
#passwd yourusername

The only major downside to resetting your password this way is that you’ll lose all keychain passwords, but if you’ve really forgotten your password, it’s better than nothing.

Categories: Mac Tags: ,