How to install RAR on OSX

(Win)RAR for MacOS is command line only.

Copy the RAR and UNRAR files to /usr/local/bin
Rename the rarreg.key file to rarreg.txt and copy it to /usr/local/lib

To test just open terminal and type “rar” and then Return.
If it is successful it will show that RAR is registered.

Properly mounting shares in OSX

This tip is taken from information found on the website

Mounting shares in OSX is very easy. In Finder, click Go > Connect to Server.

Depending on whether your share is available as AFP (Apple Filing Protocol) or SMB (Samba), you enter afp:// or smb:// respectively. Replacing the xxx with the IP address of the server hosting the shares.

Click Connect and then select the shares you want to mount.

Most information on making these shares mount on startup tells you to drag the shared folders to your startup items. If you have 5 shared folders, this results in 5 open finder windows every time you reboot.

There is a much better way. First, create a folder where you want your shares to appear e.g. /Users/yourusername/Shares.

Note: the following steps require you to have superuser rights!

Open the Terminal application and edit the /etc/auto_master file:

sudo  vi /etc/auto_master

The file should look similar to this:

# Automounter master map
+auto_master      # Use directory service
/net        -hosts      -nobrowse,hidefromfinder,nosuid
/home       auto_home   -nobrowse,hidefromfinder
/Network/Servers  -fstab
/-       -static

Add the following line to this file:


So it should now look something like this:

# Automounter master map
+auto_master # Use directory service
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/Users/yourusername/Shares auto_afp
/- -static

Save the auto_master file and create a new file /etc/auto_afp

sudo vi /etc/auto_afp

Add a line for every share required to this file in the following format:

share_name -fstype=afp afp://username:password@host_ip/shared_folder_name

  • share_name: The name of the local folder (this is the name you’ll see in the Shares folder)
  • -fstype=afp: Use Apple Filing Protocol. This can also be set as smbfs if you require the Samba protocol.
  • username:password: The username and password you use to connect to the share
  • host_ip: Enter your server IP address (or hostname)
  • shared_folder_name: The name of the remote folder (the share name of the folder)

Now set the correct permissions for the file:

sudo chmod 600 /etc/auto_afp

And finally, restart the automount daemon:
sudo automount -vc

Your shares will automatically be mounted on every reboot, without obtrusive Finder windows.

Fix for SMB sharing in Mountain Lion

After searching for a solution to this problem for ages I finally came across the answer on the Oceanside Coding website.
I used Lingon, see downloads page for link, to install the plist file as it saves messing about with permissions in Terminal.
Just create a new Users Daemon file.

Lingon settings

Change to Expert mode and enter the following code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>sleep 60;touch "/Library/Preferences/SystemConfiguration/"</string>

Lingon code

Click Save and enter your Admin password. The plist file will now be installed.
To enable this to work just log out and back in and you should find that SMB file sharing is now working.

Copy folder keeping permissions

Including --extended-attributes (or -E) with rsync is probably a good idea.

sudo rsync -aE /Users/me/ /Newvol/Users/me

Disable root user in MacOSX

You can use Terminal to disable the root user in MacOSX.

Launch Applications > Utilities >

Type: dsenableroot -d

Enter password.

You should see a message stating that the root user has successfully been disabled.