<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>sites</title>
<link>http://mblog.lib.umich.edu/sites/</link>
<description>helping Sites to facilitate the mission</description>
<language>en</language>
<copyright>Copyright 2009</copyright>
<lastBuildDate>Mon, 28 Sep 2009 10:48:03 -0500</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.17</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 

<item>
<title>Use Snow Leopardâ€™s Built-In VPN Client to Access the ITCom VPN</title>
<description><![CDATA[<p><b>DISCLAIMER:</b> This post has not been authored by ITCom and any change they make to their VPN systems may break this.</p>
<p>Instead of using the Cisco VPN client to access the <a href="http://www.itcom.itcs.umich.edu/vpn/">ITCom VPN</a>, you can use Snow Leopard&rsquo;s built-in VPN client to do so. Here are the steps involved:</p>
<ol>
<li>Open the Network preference pane in System Preferences.</li>
<li>Click the plus sign to add a new network interface.
<ul>
<li>For Interface, select VPN.</li>
<li>For VPN Type, select Cisco IPSec</li>
<li>Write a descriptive description.</li>
</ul></li>
<li>Navigate to the ITCom page to download the desired VPN profile (either <a href="https://www.itcom.itd.umich.edu/vpn/software/UM-off-campus-access.pcf">off-campus</a> or <a href="https://www.itcom.itd.umich.edu/vpn/software/UM-on-campus-wireless.pcf">on-campus</a>).</li>
<li>Viewing the profile as a text file, you can see key-value pairs with the format KEY=VALUE.</li>
<li>Back in the Network preference pane, select your newly-created VPN. Set the following values:
<ul>
<li>Server Address: set to the <b>Host</b> value in the profile.</li>
<li>Account Name: set to your uniqname.</li>
<li>Password: set to your Kerberos password (though you'll still need to enter it upon connecting).</li>
</ul></li>
<li>Click &ldquo;Authentication Settings...&rdquo;. Set the following settings:
<ul>
<li>Shared Secret: set to the <b>GroupPwd</b> value in the profile.
<li>Group Name: set to the <b>GroupName</b> value in the profile.
</ul></li></ol>
<p>Connect to the VPN and you&rsquo;ll be able to access campus resources from home.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2009/09/use_snow_leopar.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2009/09/use_snow_leopar.html</guid>
<category>Mac</category>
<pubDate>Mon, 28 Sep 2009 10:48:03 -0500</pubDate>
</item>
<item>
<title>Disable Safari 4&apos;s Welcome Video (Mac OS X)</title>
<description><![CDATA[<p>If you're deploying Safari 4 into a lab setting, you probably don't want users seeing the <a href="http://www.apple.com/safari/welcome/">welcome video</a> when they launch Safari for the first time. To prevent this from occurring, simply set the following preference for the <code>com.apple.Safari</code> domain (as a string): <code><i>LastDisplayedWelcomePageVersionString</i> = "4.0"</code>.</p>

<p>If you're using MCX, that should be all you need to do. If you're using Radmind, the easiest way to propagate that setting (aside from local MCX) is to write it to <b><code>/Library/Preferences/com.apple.Safari.plist</code></b> with the <b><code>defaults</code></b> command.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2009/07/disable_safari_1.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2009/07/disable_safari_1.html</guid>
<category>Mac</category>
<pubDate>Fri, 17 Jul 2009 15:41:08 -0500</pubDate>
</item>
<item>
<title>Matlab FlexLM license</title>
<description><![CDATA[<p>The Matlab FlexLM license file on Mac clients can </p>

<p>1) use a cname and </p>

<p>2) does not appear to require the MAC address of the license server in the config line.</p>

<p>/Applications/MATLABver/licenses/network.lic:</p>

<p>SERVER license-server.x.x.x.x 27000<br />
USE_SERVER</p>

<p>done.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2009/02/matlab_flexlm_l.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2009/02/matlab_flexlm_l.html</guid>
<category>Mac</category>
<pubDate>Thu, 19 Feb 2009 11:32:29 -0500</pubDate>
</item>
<item>
<title>A LaunchAgent to Make the Extended Print Dialog Appear by Default</title>
<description><![CDATA[<p>There&rsquo;s a good tip over at <a href="http://www.tuaw.com/2008/09/15/terminal-tips-make-extended-print-dialog-show-by-default/" title="Terminal Tips: Make extended print dialog show by default - The Unofficial Apple Weblog (TUAW)">TUAW</a> for making the extended print dialog show up by default, but I wanted to make sure that it applied to every user at login so we&rsquo;d stop having users confused by the minimal approach to the standard dialog. So, I wrote the following LaunchAgent:</p><pre><?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">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>edu.umich.printdialog.default.extended</string>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/bin/defaults</string>
		<string>write</string>
		<string>-g</string>
		<string>PMPrintingExpandedStateForPrint</string>
		<string>-bool</string>
		<string>TRUE</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
</dict>
</plist></pre><p>Because the Label string is <code>edu.umich.printdialog.default.extended</code>, the plist is written to <code>/Library/LaunchAgents/edu.umich.printdialog.default.extended.plist</code>.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2009/01/a_launchagent_t.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2009/01/a_launchagent_t.html</guid>
<category>Mac</category>
<pubDate>Tue, 06 Jan 2009 11:07:08 -0500</pubDate>
</item>
<item>
<title>A Shell Script to Randomize Your Computer&apos;s Wake Time</title>
<description><![CDATA[<p>Lately, weâ€™ve been exploring the option of having our computers sleep after some idle time.  One of our concerns was our nightly maintenance window; we wanted our computers to wake up in the middle of the night, but we didn't want to have them all wake up at exactly the same time.  So, I wrote this script to randomize the time at which they wake up nightly:</p>
<br/>
<pre>#!/bin/sh

# a script to randomize the computer's wake time

pmset=`whereis pmset`
type=wakeorpoweron
days=MTWRFSU

# The maximum number of seconds past 3:15 AM to wake up.
maxsleep=5400

# Randomize the number of seconds.
sleeptime=`perl -e 'srand (time ^ $$ ^ unpack "%L*", \` ps axww | gzip\`);\
        print int(rand( $ARGV[0] ));' $maxsleep`

# Default time to wake up is 3:15 AM.
hours=3
minutes=15
seconds=0

# Convert the number of seconds into hour, minutes, seconds

# Subtract hours.
while [ $sleeptime -gt 3599 ]
do
        # At least 1 hour.
        let "hours += 1"
        let "sleeptime -= 3600"
done

# Subtract minutes.
while [ $sleeptime -gt 59 ]
do
        # At least 1 minute.
        let "minutes += 1"
        if [ $minutes -gt 59 ]
        then
                let "hours += 1"
                let "minutes -= 60"
        fi
        let "sleeptime -= 60"
done

seconds=$sleeptime


# Convert to xx:xx:xx format

if [ $hours -lt 10 ]
then
        tmp=$hours
        hours="0${tmp}"
fi

if [ $minutes -lt 10 ]
then
        tmp=$minutes
        minutes="0${tmp}"
fi

if [ $seconds -lt 10 ]
then
        tmp=$seconds
        seconds="0${tmp}"
fi

fulltime="${hours}:${minutes}:${seconds}"

${pmset} repeat ${command} ${type} ${days} ${fulltime}</pre>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/12/a_shell_script.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/12/a_shell_script.html</guid>
<category>Mac</category>
<pubDate>Thu, 18 Dec 2008 16:55:21 -0500</pubDate>
</item>
<item>
<title>Use Radmind to  Manage Shared Dynamic Libraries</title>
<description><![CDATA[<p>Mac OS X Leopard stores shared dynamic libraries at <tt>/private/var/db/dyld/</tt>.  These files are updated via the <tt>update_dyld_shared_cache</tt> command.  If they arenâ€™t present, then applications will be unable to use the shared libraries, increasing virtual memory use and decreasing overall performance.  When managing multiple architectures with Radmind, however, this becomes problematic.  On a new, Intel Core 2 Duo system, you see this output:</p>
<blockquote><tt><pre>root# ls -1 /var/db/dyld/
dyld_shared_cache_i386
dyld_shared_cache_i386.map
dyld_shared_cache_rosetta
dyld_shared_cache_rosetta.map
dyld_shared_cache_x86_64
dyld_shared_cache_x86_64.map
shared_region_roots</pre></tt></blockquote>
<p>Whereas on an older, PowerPC-based system, you see this output:</p>
<blockquote><tt><pre>root# ls -1 /var/db/dyld/
dyld_shared_cache_ppc
dyld_shared_cache_ppc.map
dyld_shared_cache_ppc64
dyld_shared_cache_ppc64.map
shared_region_roots</pre></tt></blockquote>
<p>Without being properly managed, you may see error messages in the system log as follows:</P
<blockquote><tt><i>Jun 26 14:50:04 slc48 com.apple.dyld[354]: update_dyld_shared_cache[354] for arch=ppc failed: /var/db/dyld/shared_region_roots/ does not exist, errno=2</i></tt></blockquote>
<P>To properly manage this with Radmind, you should do the following:</P>
<ul><li>Include the directories <tt>/private/var/db/dyld</tt> and <tt>/private/var/db/dyld/shared_region_roots</tt> in your base transcript.  The items in the latter directory should also be included and managed with Radmind.</li><li>Ensure youâ€™re using Radmind version 1.11.0 or higher, as those versions support exclude patterns.</li><li>Add the following lines to your command file (the comments are optional):
<blockquote><i><tt># Exclude prebinding cache files<br />
# dyld_share_cache files come in i386 and powerpc flavors<br />
x ./private/var/db/dyld/dyld_shared_cache_*<br />
# Is there more than an *.applesaved version of this file?<br >
x ./private/var/db/dyld/update-prebinding-paths.txt.*</tt></i></blockquote></li><li>Add the <tt>update_dyld_shared_cache</tt> command to your Radmind scripts to ensure that the libraries are updated when you apply system updates.  This should be a post-apply script (or after <tt>lapply</tt> in your main Radmind script).</li></ul>
<P>This will allow your systems to remain up-to-date and still allow you to manage them through Radmind.</P>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/10/use_radmind_to.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/10/use_radmind_to.html</guid>
<category>Mac</category>
<pubDate>Mon, 06 Oct 2008 16:41:37 -0500</pubDate>
</item>
<item>
<title>Customize Firefoxâ€™s Default Profile Without Creating One</title>
<description><![CDATA[<p>We recently ran into problems with our default Firefox profile after upgrading to Firefox 3.  Before, weâ€™d defined a default profile in the default userâ€™s <tt>~/Library/Application Support/Firefox/Profiles</tt> folder, set it up to have the settings and homepage we desired, and let that copy into a new userâ€™s profile on login.  After having some problems with some of the settings that restricted extension installation, we discovered a way to define defaults for Firefox without having to pre-create a userâ€™s profile.  There are a few files to change in the application bundle that cause it to work as weâ€™d like:</p>
<ul><li><b><tt>/Applications/Firefox.app/Contents/MacOS/application.ini</tt></b>: Change â€œ<tt>EnableProfileMigrator=1</tt>â€? to â€œ<tt>EnableProfileMigrator=0</tt>â€? to disable the prompt on startup to import Safari preferences.</li><li><b><tt>/Applications/Firefox.app/Contents/MacOS/browserconfig.properties</tt></b>: This file contains the default homepage for the browser.  Change it as you like and all newly-created profiles will lead the user to the page you specify.</li>
<li><b><tt>/Applications/Firefox.app/Contents/MacOS/defaults/profile/bookmarks.html</tt></b>: Change this file to alter the default set of bookmarks your users receive on new profile creation.</li>
<li><b><tt>/Applications/Firefox.app/Contents/MacOS/defaults/profile/prefs.js</tt></b>: This file has no settings defined by default, but you can add your own if you like.  We added the following settings:
<ul><li><i>user_pref("browser.startup.homepage_override.mstone", "ignore");</i> disables a user receiving notification of a new version of Firefox when they're updated.</li>
<li><i>user_pref("browser.shell.checkDefaultBrowser", false);</i> causes Firefox to skip the prompt on startup to make it the default browser.</li></ul></li></ul>
<p>Your needs may vary, and you can do a lot more inside the application bundle, such as putting extensions in the <tt>/Applications/Firefox.app/Contents/MacOS/extensions</tt> folder.  Putting default settings here has two main advantages over putting it in the default user profile:</p>
<ol><li>Firefox profiles are only created as needed.  Not copying over a default profile reduces login time, and users who use Safari will never need a Firefox profile.</li>
<li>Using a default profile, all profiles have the same name (e.g. <tt>~/Library/Application Support/Firefox/Profiles/m6oj7kr0.default/</tt>).  The method Iâ€™ve outlined in this post results in differently-named Firefox profiles.  I have no idea if this is an advantage, but Firefoxâ€™s developers randomize the profile folder name for a reason, and this method preserves their methodology.</li></ol>
<p><b>Update 8/5/08:</b> Added <tt>application.ini</tt> info.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/07/customize_firef.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/07/customize_firef.html</guid>
<category>Mac</category>
<pubDate>Tue, 29 Jul 2008 15:03:53 -0500</pubDate>
</item>
<item>
<title>Prune old transcripts with tkpruner</title>
<description><![CDATA[<P>One of the things weâ€™ve noticed is that since we sync out our loadsets to several servers around campus, weâ€™re wasting time syncing old loadsets that arenâ€™t in use anymore.  Even with rsync, the files need to be compared.  So, to that end, I wrote a script I call â€œtkprunerâ€? that walks the config file of a Radmind server, finds the loadsets that are in use, and backs everything else up to <tt>~/transcript/obsolete</tt> and <tt>~/file/obsolete</tt>.  It also backs up unused command files, moving them to <tt>~/command/obsolete</tt>.  Everything the script backs up is timestamped: <tt>~/transcript/foo/bar/FooBar.T</tt> would become <tt>~/transcript/obsolete/FooBar.20080708.T</tt> if I backed it up today.</P><P>Using this script, we can automate the archival process for old transcripts.  Our obsolete folder isnâ€™t included in syncs, and itâ€™s located on a RAID array, so we arenâ€™t concerned about data loss, merely with ensuring that our satellite servers have the transcripts that are in use.</P>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/07/prune_old_trans.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/07/prune_old_trans.html</guid>
<category>Mac</category>
<pubDate>Tue, 08 Jul 2008 10:06:07 -0500</pubDate>
</item>
<item>
<title>Leopard Site-Wide</title>
<description><![CDATA[<p>Mac OS X 10.5 â€œLeopardâ€? has been deployed site-wide.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/06/leopard_site-wi.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/06/leopard_site-wi.html</guid>
<category>Mac</category>
<pubDate>Mon, 23 Jun 2008 17:19:39 -0500</pubDate>
</item>
<item>
<title>Union and Consultant Workstation Leopard deployment</title>
<description><![CDATA[<p>We upgraded the Union Mug (cyber) and Union Tap (full-use) workstations to Leopard today. We also upgraded the Angell Hall and SEB consultant workstations and very much look forward to user-feedback as we proceed with our site-wide Leopard deployment for Summer term.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/06/union_and_consu.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/06/union_and_consu.html</guid>
<category>Mac</category>
<pubDate>Tue, 03 Jun 2008 22:17:43 -0500</pubDate>
</item>
<item>
<title>Quick script to back up a transcript</title>
<description><![CDATA[<P>I was sick of writing <code>lmerge /path/to/transcript.T /dev/null ~/transcript/obsolete/transcript.timestamp.T</code> every time I wanted to back up a transcript before making a change, so I wrote a quick script to back up a transcript to a timestamped file:</P>
<blockquote><code><pre>#!/bin/bash

# Backs up a transcript to ~/transcript/obsolete

Transcript=$1
TranscriptNoPath="`echo $Transcript | awk 'BEGIN { FS = "/" } { print $NF }'`"
TranscriptNoEnding="`echo $TranscriptNoPath | sed -e \"s/\.T//\"`"
Today="`date +%Y%m%d`"
Target="/var/radmind/transcript/obsolete/${TranscriptNoEnding}.${Today}.T"

/usr/local/bin/lmerge -I $Transcript /dev/null $Target</pre></code></blockquote><P>Just change â€œ<code><I>/var/radmind/transcript/obsolete/</I></code>â€? to whatever folder you want to use.</P>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/05/quick_script_to.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/05/quick_script_to.html</guid>
<category>Mac</category>
<pubDate>Thu, 22 May 2008 11:40:20 -0500</pubDate>
</item>
<item>
<title>Set Hostname to Network-Supplied Hostname</title>
<description><![CDATA[<P>Nobody wants their production machines to have hostnames like â€œSitesâ€™ iMac.â€?  To get around this issue, we created a script called HostNamer to find the hostname and set it.  Under Tiger, we got away with calling <code>hostname -s</code>, but under Leopard this would often return the <I>current</I> hostname, not the desired one.  So, we created a script to look at the DNS entry for the computer's IP address.</P>
<blockquote><code><pre style="overflow-x: scroll;">#!/bin/bash

# HostNamer - Gets proper hostname from server and tells OS X to use it.

PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin; export PATH

get_ip(){
        IPADDR="`/sbin/ifconfig en0 | awk '{ if ( $1 == "inet" ) print $2 }'`"
        IPBEGIN="`echo ${IPADDR} | awk '{ split($1, a, "."); print a[1] }'`"
}

# Get IP address.
get_ip

# Make sure that IP is valid (i.e. starts with "141.")  If not, wait and try again.
# Will only try 10 times.
count=0

while [ "${IPBEGIN}" != "141" ]; do
        let "count += 1"
        echo $count
        if [ $count -gt 10 ]; then
                logger -is Failed to get correct IP address.
                exit 1
        fi

        sleep 10

        get_ip
done

HOSTNAME="`host ${IPADDR} | awk ' { for ( x = 1; x < 20; x++ ) if ( $x == "pointer" ) print $(x+1) }' | awk '{ split($1, a, "."); print a[1] }'`"

scutil --set ComputerName "${HOSTNAME}"
scutil --set LocalHostName "${HOSTNAME}"
scutil --set HostName "${HOSTNAME}"

# Now, rename the disk.

# Get the correct disk name to use
DiskName="`diskutil list | grep -m 1 Apple_HFS | awk '{ print $NF }'`"

diskutil rename $DiskName $HOSTNAME</pre></code></blockquote>
<P>The portion that checks for a correct IP (for us, 141) is there because on Intel-based Macs, we noticed that the script was called before the network was upâ€”weâ€™re running it via a StartupItem.  We also created a link to this script in our Radmind post-apply folder, so the system will be renamed before rebooting.  That way, it comes up with its correct name.  Finally, we rename the hard disk to the hostname to allow for easy identifiation of in-use computers.</P>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/05/set_hostname_to.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/05/set_hostname_to.html</guid>
<category>Mac</category>
<pubDate>Thu, 22 May 2008 09:56:04 -0500</pubDate>
</item>
<item>
<title>Angell Hall Cyberstation - Color Printing fix</title>
<description><![CDATA[<p>We will be deploying the 'pstoxeroxps' client-side cups filter to the Angell cyberstations this evening to resolve the Xerox 7400 Color Phaser 'paused' queue printing issue we identified last week. Both the 'pstophaserps' and 'pstoxeroxps' filters are noted dependencies in the Xerox PPDS.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/05/angell_hall_leo_1.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/05/angell_hall_leo_1.html</guid>
<category>Mac</category>
<pubDate>Mon, 19 May 2008 16:30:23 -0500</pubDate>
</item>
<item>
<title>Angell Hall Fishbowl Cyber - Leopard Deployment</title>
<description><![CDATA[<p>We have deployed our Leopard loadsets to the Angell Hall Fishbowl cyberstations this afternoon. These machines will be upgrading to leopard on next user logout or nightly maintenance session, whichever should occur first.</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/05/angell_hall_leo.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/05/angell_hall_leo.html</guid>
<category>Mac</category>
<pubDate>Mon, 19 May 2008 16:18:25 -0500</pubDate>
</item>
<item>
<title>Angell Hall Cyberstation - Leopard Deployment</title>
<description><![CDATA[<p>As part of our Leopard migration process, we upgraded the Angell Hall Cyberstations (stations 3-28) to Leopard today. Pending feedback, we plan to upgrade the Angell Fishbowl cyberstations and the Angell Hall/SEB consultant workstations with our full-use Leopard offering within the next few days. Currently, the Angell Hall Color printer is not functioning properly in the Angell Cyberstation loadset and we are currently working on this issue. Enjoy!</p>]]></description>
<link>http://mblog.lib.umich.edu/sites/archives/2008/05/angell_cybersta.html</link>
<guid>http://mblog.lib.umich.edu/sites/archives/2008/05/angell_cybersta.html</guid>
<category>Mac</category>
<pubDate>Thu, 15 May 2008 19:58:07 -0500</pubDate>
</item>


</channel>
</rss>