Life & Technology

Handful lessons in different areas of technology and life in general.

Monthly Archives: April 2012

Creating New Administrator Account on your Mac OSX Lion

Last week, I received my issued MacBook Air for a local client and upon logging in, I immediately fired up Safari ┬áto download my most needed tools and utilities for my day to day ( I mean night to night) development. When I’m through, I then clicked the .dmg file to install on the machine and then the system prompted me for a password for authentication as this is a required step to be able to install new software on the machine. And for the moment, I went blank for a moment as I don’t know the password of currently logged-in user and then it hit me that the OSX allows you to create a new user with Administrator privilege via its root terminal. So I did.

Steps I used to achieve my goal:

  1. Reboot the machine either clicking the Apple logo and hit restart or via the Power button on the keyboard and choose Restart.
  2. Just so before the Apple logo starting to show up, hit Command + S key combination until you see the scrolling text messages appear right in front of you eyes. This step allows you to boot on a Single User Mode so that you can perform root level actions.
  3. Next is we need to check the consistency of the system first before we issue our commands. Type fsck -fk and hit Enter. You can learn more about fsck here. This command will take a while but not too long to finish.
  4. In order for us to issue a command, we need to make sure that we mount the root folder and make it writeable. We can accomplish this by typing on the root prompt: mount -uw / (slash). To know more about mount on Mac OS, you may go here.
  5. Next, we need to delete a single file that determines if our OSX Lion machine is already completed or not. Again, on our root prompt, type rm /var/db/.applesetupdone and hit Enter key. Please note the dot (.) preceding the word applesetupdone.
  6. The last step is the easiest of them all, restarting your machine by issuing the command reboot on the terminal.

When your OS X Lion is rebooted, you will be greeted a familiar Welcome Wizard for first time user of this machine starting out with choosing your Country, Keyboard preferences, Setting up your Network (internet), Signing on your Apple ID, etc. The most important of them all is you will now be presented with a New Account setup and choosing your own username and password on the screen that will be presented to you. After this, you will also be showing the iCloud Setup Wizard for which you might wanna need if you like to share your data across your Apple devices.

So there you go, after that click/next operation, it will be up to you if you like to delete that old user or not. Please note that I only tested steps above on Mac OSX Lion only.

I thank Apple for providing such control and access in order for us not to reinstall our existing Lion setup.