»
S
I
D
E
B
A
R
«
Setup a NetBoot server on any 10.5 / 10.6 workstation!
Mar 25th, 2010 by admin

At the moment this is a brief rundown. It will be tidied up later and screenshots will be added. It might even be broken! So use at your own risk.

You should be familiar with the Terminal and Workgroup Manager’s Insepctor. This also assumes that you have a separate active DHCP server.

First, take a 10.5 or 10.6 machine, give it a unique name and a fixed IP address on the network (e.g. NetBoot Server).

Open Directory Utility, /Applications/Utilities in 10.5 and /System/Library/CoreServices in 10.6. Enable the root user.

Login as the root user.

Create the following directories on the hard drive, using the following terminal commands:
mkdir /Library/NetBoot/NetBootSP0
mkdir /Library/NetBoot/NetBootClients0
mkdir /private/tftpboot
Now create links (aliases) in order for NFS, NetBoot/TFTP to function:
ln -s NetBootSP0 .sharepoint
ln -s NetBootClients0 .clients
ln -s /Library/NetBoot/NetBootSP0 /private/tftpboot/NetBoot

In Terminal, edit the /etc/exports file with nano, add the line
/LibraryNetBoot/NetBootSP0 -ro

In Sharing System Preferences, share following folders:
/Library/NetBoot/NetBootSP0 (if you want access from the network to update NetBoot images…)
/Library/NetBoot/NetBootClients0
Make sure “Everyone” is set to read only

Download the Server Admin tools from Apple and install the approriate one for you OS (10.5 = 10.5.7, 10.6 = 10.6.2)
• Open Workgroup Manager
• Authenticate to the server “localhost” with the root name and password
• Select Preferences in the Workgroup Manager menu
• Tick the “Show all records” and Inspector check box
• Click the small globe next to “Authenticated as…” and choose “Local” in the menu that pops up
• Below that, click the newly visible “Target” All records tab. It should be the fifth tab along after Computer Groups
• Select Config in the popup menu
• Create two new records with the New Record button, give them the rcord names of “dhcp” and “NetBootServer”
• Choose the “dhcp” record and create a New attribute of “netboot_enabled” with a value of “en0″

/\
(…conflicting? not needed?…)
\/

With nano in the Terminal, create a file /etc/bootpd.plist and insert the following contents:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">


NetBoot

bootp_enabled

detect_other_dhcp_server

dhcp_enabled

netboot_enabled

en0

old_netboot_enabled

relay_enabled

relay_ip_list

reply_threshold_seconds
0

ENSURE THAT NO OTHER NETBOOT SERVERS ARE RUNNING ON YOUR NETWORK

All being correct above, your mac should be ready to serve NetBoot images. Create or copy a .nbi file to the /Library/NetBoot/NetBootSP0 folder.

Execute the following command in Terminal:
/usr/libexec/bootpd

Now you can NetBoot all day every day!

To check that everything is configured, you can log in to a machine that can boot the OS in your .nbi and check its Startup Disk System Preference for the ability to select the .nbi as a Startup Disk.

(Testing SousChef) Delicious fried rice
Sep 12th, 2009 by admin

Embedded Recipe Image (Unsupported on IE 7 and earlier)

Delicious fried rice

Wednesday, 29 October 2003: Episode 4 — shellfish. Fried rice is one of those lovely comforting foods that everyone in the world seems to like — no one is intimidated by fried rice. Somehow all these rogue ingredients have crept into restaurant versions over the years, such as corn, peas, ham and the like. I find the trick with fried rice is to keep it really simple and traditional — just some really fresh and fluffy eggs, onion, bacon or Chinese sausage, ginger and some spring onions.Serves: supper for 2-4; part of a banquet for 6

Ingredients

  1. 1/3 cup peanut oil
  2. 1/3 cup peanut oil
  3. 4 large free-range eggs, beaten
  4. 1 tablespoon peanut oil, extra
  5. 11/2 tablespoons finely chopped ginger
  6. 4 garlic cloves, diced
  7. 1 medium-sized brown onion, finely diced
  8. 1/2 cup roughly chopped rindless bacon rashers or Chinese sausage
  9. 1 teaspoon white sugar
  10. 2 tablespoons Shao Hsing wine
  11. 5 cups cooked medium-grain white rice
  12. 1 tablespoon oyster sauce
  13. 1 cup finely sliced spring onions (scallions)
  14. 3 teaspoons Maggi seasoning
  15. 1/4 teaspoon sesame oil
  16. 2 spring onions (scallions), finely sliced on the diagonal
  17. 1/4 cup light soy sauce

Directions

  1. Heat oil in a hot wok until the surface seems to shimmer slightly. Pour beaten eggs into wok and cook for about 1 minute, lightly scrambling them and rotating the wok to ensure even cooking. When almost cooked through, carefully remove omelette from wok with a fish slice and drain on kitchen paper. Set aside.
  2. Wipe out wok with kitchen paper, add extra oil and stir-fry ginger and garlic for 1 minute, or until very aromatic. Add onion and stir-fry for 2 minutes, or until lightly browned and tender. Add bacon and stir-fry for a further minute, or until lightly browned. Stir in sugar and wine, then stir-fry for 30 seconds.
  3. Finally, add rice, reserved omelette, oyster sauce, spring onions, Maggi seasoning and sesame oil. Stir-fry for 3 minutes, or until rice is heated through. Roughly chop omelette into smaller pieces as you stir.
  4. Divide rice between individual bowls and garnish with extra spring onions. Combine soy sauce and chilli in a small bowl and serve on the side.
Search, share, and cook your recipes on Mac OS X with SousChef!
UPDATED: ARD Script – Timesavers
Sep 10th, 2009 by admin

Want to control the sound volume of some remote computers? Send this UNIX command with ARD …

osascript -e 'set volume 0' will mute the sound
osascript -e 'set volume 7' will set the sound to the maximum volume

Use 1-6 for anything in between!

Do you long for the ability to log in to several computers at once with the same user account?
(Note: Make sure you choose to use the console user “root” because no one is logged in!)


If you have a login list showing the “Other…” option at the bottom…

osascript -e 'tell application "System Events" to key code 53'; \
osascript -e 'tell application "System Events" to delay 2.0'; \
osascript -e 'tell application "System Events" to keystroke "oth"'; \
osascript -e 'tell application "System Events" to delay 2.0'; \
osascript -e 'tell application "System Events" to keystroke return'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke "INSERT USERNAME HERE"'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke tab'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke "INSERT PASSWORD HERE"'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke return'

If your login windows have a name and password text box…

osascript -e 'tell application "System Events" to key code 53'; \
osascript -e 'tell application "System Events" to delay 2.0'; \
osascript -e 'tell application "System Events" to keystroke "INSERT USERNAME HERE"'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke tab'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke "INSERT PASSWORD HERE"'; \
osascript -e 'tell application "System Events" to delay 0.5'; \
osascript -e 'tell application "System Events" to keystroke return'

If you have a list of names and want to login as a specific user…

osascript -e 'tell application "System Events" to key code 53'; \
osascript -e 'tell application "System Events" to delay 2.0'; \
osascript -e 'tell application "System Events" to keystroke "INSERT PARTIAL USERNAME HERE"'; \
osascript -e 'tell application "System Events" to delay 1.0'; \
osascript -e 'tell application "System Events" to keystroke return'; \
osascript -e 'tell application "System Events" to delay 1.0'; \
osascript -e 'tell application "System Events" to keystroke "INSERT PASSWORD HERE"'; \
osascript -e 'tell application "System Events" to delay 1.0'; \
osascript -e 'tell application "System Events" to keystroke return'
ARD Script – reset the printing system in Mac OS X 10.5
Sep 10th, 2009 by admin

PRINTERS_CONF=”/etc/cups/printers.conf”

CUPS_PLIST=”/System/Library/LaunchDaemons/org.cups.cupsd.plist”

launchctl unload “${CUPS_PLIST}”

rm ${PRINTERS_CONF}

launchctl load “${CUPS_PLIST}”

ARD Script – Reset the printing system in Mac OS X 10.4
Sep 10th, 2009 by admin

killall “PrinterProxy” “Printer Setup Utility” “cupsd” 2>/dev/null

sleep 1

rm -rf ~/.lpoptions

~/Library/Printers/*.app \

~/Library/Preferences/com.apple.print.* \

~/Library/Preferences/ByHost/com.apple.print.* \

/etc/cups/printers.conf* \

/etc/cups/classes.conf* \

/etc/cups/ppds.dat \

/etc/cups/ppds/* 2>/dev/null

/usr/sbin/cupsd

Flushing DNS cache on Mac OS X 10.5
Jul 7th, 2008 by admin

Mac OS X 10.5 no longer includes lookupd. The following command is used instead to flush DNS cache:

dscacheutil -flushcache

Policy Banner
Jul 7th, 2008 by admin

Note Policy Banner does not work with Mac OS X 10.5  or 10.6 as yet!

Here’s a great utility from PS Enable software. Policy Banner

It allows you to display an acceptable usage agreement before anyone logs in. It will cover the login window and won’t disappear until they click the Accept button. Upon logout, after 60 seconds, it will reappear again.

There is a customisable “logo.gif” (128 x 128) and “Policy.rtf” included in the package. Here’s my tip for implementing it in a DET school…
1. Install the package as standard with all computers at the login window (and maybe even locked!).
2. Create your own logo.gif (remember, 128 x 128). I used Photoshop to make a 128 x 128 canvas and resized the school’s logo to fit inside.
3. Create your own Policy.rtf, you may need to do some testing so that the text will fit nicely inside the bounds of the dialogue box.
4. Copy logo.gif and Policy.rtf to the hard drive of every computer via ARD.
5. Assuming you have copied it to the top folder of the disk, send the following UNIX commands via ARD.

cp /logo.gif /System/Library/CoreServices/SecurityAgentPlugins/PolicyBanner.plugin/Content/Resources/
cp /Policy.rtf /System/Library/CoreServices/SecurityAgentPlugins/PolicyBanner.plugin/Content/Resources/

6. You can now restart or login/logout to make the Policy Banner appear.

If you are going to update your logo.gif and Policy.rtf in the future, the Policy Banner cannot be active while you do so!

For those of you who are more adventurous, the source code is provided. You would be able to edit the size of the dialogue box and any elements using XCode.

Always use the right version of Workgroup Manager
Jul 7th, 2008 by admin
Pasted Graphic 1

REMEMBER it’s a good idea to never ever use Workgroup Manager under the following circumstances:-

A Mac OS X 10.3 client managing a Mac OS X 10.4 server
A Mac OS X 10.4 client managing a Mac OS X 10.5 server
A Mac OS X 10.4 client managing a Mac OS X 10.3 server
A Mac OS X 10.5 client managing a Mac OS X 10.4 server

You may just screw something up in the server’s Open Directory database under these circumstances.

You can use the 10.4 Server Admin tools under Mac OS X 10.5…

SAMSUNG CLP-550N, printing from Mac OS X 10.4.x
Jul 7th, 2008 by admin
Pasted Graphic 3Note This tip is no longer necessary as SAMSUNG have finally updated the drivers for 10.5/10.4! You may still want to use IP Printing however to avoid the annoying (and uneditable) Bonjour printer name.

Mac OS X 10.4 Tiger no longer allows printing to the SAMSUNG CLP-550N through Rendezvous/Bonjour. SAMSUNG’S stance is that it is Apple’s fault and they are not providing a fix. Thankfully, printing can still be achieved through the use of HP JetDirect IP printing.

1. Open the Printer Setup Utility.
2. If it’s there, delete the existing queue for the CLP-550N.
3. Click the Add button.
4. Choose the “IP Printer” tab.
5. In the Protocol: popup menu choose “HP Jet Direct – Socket”.
6. Type the IP address of the printer in the Address: field.
7. Choose the appropriate SAMSUNG driver from the Print Using: popup menu, if you have it installed.
8. Click the Add button and quit the Printer Setup Utility.

Make sure you do a test print!

Setting computer screen resolution en masse
Jul 7th, 2008 by admin
Pasted Graphic 4

You may remember back in the good old days of Apple Network Assistant 3.5 and below you could change a lot of settings on client computers such as screen resolution or bit depth. Unfortunately, a lot of ANATs abilities disappeared with the introduction of OS X and Apple Remote Desktop. Thankfully, OS X lies on top of UNIX which has many command lines that alter system settings! Now I’ll show you how to change a computers screen resolution.

1. Download the “cscreen” program here.

2. Place it somewhere on the hard drive of a client computer, e.g. / (the top folder of the disk).

3. Open Terminal.app and type the following:-
chmod u+x /path/to/file/cscreen
e.g.
chmod u+x /cscreen

4. Now you can run this command on client machines from ARD using “Send UNIX command”. The syntax for the command is:-
cscreen -x -y
i.e.
/cscreen -x 1344 -y 840 NB (new resolution common to Alu iMacs)
/cscreen -x 1024 -y 768
/cscreen -x 800 -y 600

Check the Display System Preference on a computer for its available resolutions.

For information on what else can be changed and how to use it, simply open Terminal.app on a client computer and type:-
/cscreen

»  Substance: WordPress   »  Style: Ahren Ahimsa