To reset your OS X password without an OS X CD you have two ways
First Way “create a new admin account”
Reboot
Hold apple + s down after you hear the chime.
When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now
After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!
Second way “Resetting or changing your existing password”
If you’ve ever forgotten your user account password in OS X, All you need is to remember your username (you do remember that, right?) and then reboot your computer.
Hold apple + s down after you hear the chime.
sh /etc/rc
passwd yourusername
reboot
P.S. The only major downside to resetting your password this way is that you’ll lose all keychain passwords,
The default vim is pretty bland and unimpressive. I would share a few of the settings I have found or plundered from Linux installations in order to make vim more usable.
This can go in your .vimrc or in a global location such as /usr/share/vim/vimrc.
I would be interested in what other command line and vim users do to improve Snow Leopard.
step 1. Add following code to /usr/share/vim/vimrc
set nocompatible " Use Vim defaults
set bs=2 " backspacing over everything in insert mode
set ai " Auto indenting
set history=100 " keep 100 lines of history
set ruler " show the cursor position
set viminfo='20,\"200 " keep a .viminfo file
syntax on " syntax highlighting
set hlsearch " highlight the last searched term
filetype plugin on " use the file type plugins
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif
You may never need this, but if you administer servers remotely via the built in Apple VNC, it is the best trick ever.
However, the VNC service occasionally crashes, and locks my session. It also refuses any more VNC logins. This is particularly frustrating when I am off site! Apple has analyzed this and has no explanation or fix.
Here solution howto fix it: If SSH access is enabled on the server, you can connect to the server via an SSH client and run this command:
You must log in with admin rights, and must enter the admin password again to run the command. It can take a minute to run. After it finishes you’ll able to login again via VNC.
Advanced OS X users know that Darwin comes with ipfw, which can be used to set up a custom firewall. IPFW’s flexibility, very targeted bandwidth limiting rules can be made in only a few lines. This same service however can be used to also limit bandwidth on specific ports.
The following ipfw rules will limit connections from Mac to ISP’s mail server to 100K per second only for outgoing smtp connections:
sudo ipfw pipe 1 config bw 100Kbit/s
sudo ipfw pipe 1 tcp from me to smtp.west.cox.net 25
Obviously, the rate can be tailored to anything you like, and the rule is specific enough not to get in the way of any other connections going on.
to remove the pipe from the port
A dark scary place full of text. That’s how it feels at first anyway. This is a selection of Terminal Commands that I have found particularly useful. Change settings for Spaces, Spotlight, Dock, Finder, Time Machine, System, etc that aren’t accessible through the application or system preferences. If you are just making your first forays into OS X Terminal land hopefully they will help you out.
Here are some very useful terminal commands and tips for hidden Mac OS X settings.
In 10.6 that when use Exposé in Application Windows mode, it shows all windows, not just the ones in the current Space. I always end up clicking on the wrong window and being whisked away to a another Space.
To stop that from happening, open Terminal and run these two commands:
defaults write com.apple.dock wvous-show-windows-in-other-spaces -bool FALSE
killall Dock
From now on, Exposés Application Windows mode will only show windows in the current Space.
To reverse this hint, use
defaults delete com.apple.dock wvous-show-windows-in-other-spaces
killall Dock
Snow Leopard’s Terminal has a new very useful feature “SPLIT” / “COLLAPSE” as in many text editors. Check out the split/collapse window buttons here above the scroll bar:
Click the top “split” button or press Command+D shortcut and now you’ve got your window split into two usable panes like so: To collapse the window press Command+Shift+D
ALso, you can do multiple splits. Aside from general speed increase I think split pane in Terminal is my new favorite feature.
Recent Comments