Create a Hidden Administrator

I like to hide the administrator account from prying eyes, this helps add to the security of your machine by not making it obvious what accounts are on the machine.

To do this you need to do a number of things, first of all log in to the Mac with an admin account.

Go to System Preferences, then Accounts, then click on Login Options & change the following options

Display login window as : Name and password
Disable Automatic Login

Next you can either create a new admin account to hide, or you can edit and hide an existing one

Now, right-click (CTRL Click) on the account you wish to hide and choose Advanced Options

Set the User ID to a number less than 500, I usually do between 490 and 499 as there are a few system accounts that use earlier numbers

Now change the Home directory to something someone wouldn’t think to look, a lot of people use /var/

It’s also a good idea to put a . in front of your home folder to hide it further, so the path would be /var/.admin

Now you need to move and rename your actual home folder, to do this it’s easiest to use the Terminal, so open that up and type the following

sudo mv /Users/admin /var/.admin
sudo chown -R admin /var/.admin

Now you need to remove the Public and Sites folders from your home folder, as you already have a Terminal window open then you can enter the following to remove them

sudo rm -R /var/.admin/Public /var/.admin/Sites

OK, now thats all done you need to make some changes to the loginwindow preferences, this can also be done in the Terminal, so enter the following

sudo defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array admin

This will hide any account with a User ID under 500 and add your ‘admin’ account to the hidden users list

Test this by rebooting and logging in as a non-admin user, go to System Preferences and then Accounts, if all is well then the admin account will not show up

Now log out and log in as the hidden admin user, I tend to put some applications on the Desktop of this hidden account, just ones that I’d rather the end user of the machine not use as they have the potential to break their machines if not used correctly (I once had a user use OnyX to display hidden files and then they deleted the mach.kernel as they didn’t recognise the file and thought it could be a virus) so I now keep this out of their reach

Unhide the Library folder in Lion

By default, the Library folder in your user account is hidden in Lion
To switch this you need to enter the following in a Terminal window

chflags nohidden ~/Library

now reopen a Finder window, click on your home folder and you will see the newly restored Library folder

A video highlighting this can be viewed here 

Disable Bonjour advertising

As a security precaution I always disable Bonjour advertising on all macs on my network, please note that this will not stop Bonjour from working, but it will stop your macs from advertising their presence on your network.

Here is how to do it

Open a Terminal window

If you are logged in as an administrator then type the following:

sudo nano /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

you need to look for the following section

<array>
<string>/usr/sbin/mDNSResponder</string>
<string>-launchd</string>
</array>

now add the following string to the array

<string>-NoMulticastAdvertisements</string>

so the array should now look like this

<array>
<string>/usr/sbin/mDNSResponder</string>
<string>-launchd</string>
<string>-NoMulticastAdvertisements</string>
</array>

To save the file press CTRL-X

This will ask you if you wish to save, press Y for yes, and N for no

If you chose to save it then you will get a prompt about the save location, this will more than likely be the same place you opened the file from, in this example we want the file to stay in the same location, so just press ENTER to complete the save process

Reboot your machine and see if it shows up in Finder (on a different machine), if it does then you may have a spelling mistake in the additional line, reopen the file using the instructions above and check it over

As I said this will not disable Bonjour, so you will still be able to connect to Bonjour printers etc.

Hide a volume

To hide a volume in Mac OS X 10.6 you will need to do the following

First, Install the Developer Tools (You can find these on the Mac OS X Installation Disc that came with your machine, or you can download Xcode from the Mac App Store).

Once you have done this Open a Terminal Window and type the following

sudo SetFile -a V /Volumes/VolumeName

replace VolumeName with the name of the volume you wish to hide

then type

sudo reboot

when the machine has rebooted you will notice that the volume no longer appears either on the desktop, or in a Finder window

to reveal a previously hidden volume just type the same command but use a lower case v

eg.

sudo SetFile -a v /Volumes/VolumeName

A common use for this would be to hide a volume with sensitive data on, although this will not encrypt any data so is not the best method for confidential items.

Hide a Bootcamp volume from OS X

To hide a bootcamp volume in Mac OS X 10.6 you will need to do the following

First, Open Disk Utility, highlight the Windows partition, click on info and note down the UUID

Open TextEdit & create a file called fstab.txt & save it to the root of the OS X partition, enter the following text into it

UUID=EnterUniqueIdentifierHere none ntfs ro,noauto 0 0

For FAT32 formatted partititons, replace ‘ntfs’ with ‘msdos’

Save & quit TextEdit

Open Terminal, rename & move the file to /etc, do this by typing the following

cd /
sudo mv fstab.txt /etc/fstab

Reboot the machine & log in, you should no longer see the Boot Camp partition on the desktop