Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.9: Update OS without creating a user on a new Mac System 10.9
This is my take/an update on las_vegas' hint I found here awhile back for running OS updates without creating a user on a Mac. It is applicable to any system 10.5 and up.

This can be helpful if you have a Time Machine backup that's on a newer OS than your install media, or if you're selling/donating your Mac as it saves the new user having to update things.

First things first, wipe your drive (and zero it if you don't trust the end user of this computer) and reinstall your desired OS.

Once your OS is installed, boot to your install media or the Recovery Partition if available. Open Terminal from the Utilities option in the menubar. In the new Terminal window, type the following:
resetpassword

This will bring up the Password Reset utility. Click Macintosh HD or whatever your HDD is called. You'll notice the only user account that's available is root. Enter a password you'd like to use/remember, though it doesn't really matter as we'll be disabling root and removing this password later. Click save, close the password reset utility and go back to working in Terminal. Now you'll want to enter the following command:
touch /Volumes/Macintosh\ HD/private/var/db/.AppleSetupDone
This will create the file on Macintosh HD that tells the computer it has completed the setup so you're able to skip the process and login with the root account we just enabled.

Close Terminal and reboot the computer into the Macintosh HD. You should be greeted by the login screen with an option that says Other. Click Other, enter root as the username and the password you chose to login.

Proceed with Software Updates and any optional software you'd like to install, making sure to install for All Users if prompted. Also keep in mind that any preference changes you make will only apply to the root user, so there's no sense in wasting any time customizing the look, feel and general operation of the computer.

After all software is installed, open up Terminal once more. Enter the following code:
rm /private/var/db/.AppleSetupDone

This will remove the file we originally created and re-enable the setup assistant to help create the new/first user on the Mac.

Next, open up Directory Utility. This can be found in Users & Groups in System Preferences. Click Login Options, then click Join... by Network Account Server. You should then see the option Open Directory Utility.

Once in Directory Utility, click Edit in the menubar and then select Disable root user. As a note, this can be done while logged in as root. Close Directory Utility and restart the computer, booting back into to your install media or Recovery Partition. Open up Terminal one last time and enter:
resetpassword

Once the Password Reset utility has appeared, click the root user once more. Instead of changing the password, however, simply click the Reset button to reset Home Folder ACLs.

Reboot your Mac, confirm you see the Setup Assistant and you're ready to move onto restoring your backup or selling your computer!

[crarko adds: I haven't tested this one.]
  Post a comment  •  Comments (4)  
  • Currently 2.73 / 5
  You rated: 4 / 5 (11 votes cast)
 
[8,200 views] Email Article To a Friend View Printable Version
10.9: Disable App Nap System Wide System 10.9
The Finder/Get Info checkmark for preventing App Nap sometimes disappears, seemingly at random. Maybe the app updates itself, or just writes something to the application directory and the checkmark is gone. The next day your overnight render is at 10%. So in Terminal, type:
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
This seems to prevent App Nap completely, looking at the Activity Monitor » Energy » App Nap column. Running programs need to be restarted for the change to take effect.

[crarko adds: I tried the command; not sure if it's really made a difference. I don't do overnight renders, but if people who do leave lengthy processes going care to comment, we care to listen. I'm really curious about the check box resetting itself.]
  Post a comment  •  Comments (4)  
  • Currently 1.45 / 5
  You rated: 4 / 5 (20 votes cast)
 
[14,314 views] Email Article To a Friend View Printable Version
Automator Service to toggle the alias bit System 10.9
Aliases in OS X are identified to the system by an attribute referred to as the alias bit. This hint provides a very simple way to be able to toggle the alias bit of selected files within the Finder.

There may be some need to be able to toggle the alias bit of files from within the Finder. For example, I found that using Bittorrent Sync to keep files synchronized across multiple devices is very useful and a real time saver, but suffers from a bug in the OS X version, that causes aliases to lose their status as aliases. I traced the problem to the alias bit not syncing and though the developers continue to promise to fix it, I got tired of waiting.

So I put together an Automator action that installs as a service in OS X. It adds a Service to the contextual menu that will toggle the alias bit on any file or folder in the Finder. It works on multiple files at once. Just select what you want, right click, and choose 'Toggle Alias Bit.' I made it a toggler rather than a setter so you can undo it if you accidentally turn a regular file into an alias.

I'm hosting it via my Google Drive if you want to download it.

To install, unzip it, double click it, done (sort of). If you don't have Xcode installed, the first time you try to use it there will be a short pause, then you'll be prompted to download and install Xcode developer tools. This will happen automatically, you just need to OK it. The reason for the developer tools requirement is the use of the GetFileInfo and SetFile commands, which are part of that.

If you want to do it yourself in Automator, here are the relevant steps:
  • Open Automator and choose Service as the type of new document.
  • Drag Run Shell Script to the workflow. Make sure the Service receives selected files or folder in Finder, are checked for the options. Shell should be /bin/bash and pass input as arguments
  • Copy and paste the following into the 'Run Shell script' box:
    #This script will toggle the alias bit for a file  
    
    for f in "$@"  
    do  
    
    #GetFileInfo -aa should return 1 for alias, 0 for not alias  
    
        if [ `GetFileInfo -aa "$@"` == "1" ] # if it's an alias  
        then  
          SetFile -a "a" "$@" # set it to not be an alias  
        else  
          SetFile -a "A" "$@" # otherwise, it's not an alias, so make it one  
    
        fi  
    
    done
    
  • Save it as something useful like 'Toggle Alias bit.'
  • Use as described above.
Apologies if this is not the most simple or efficient scripting. It is the first bit of programming I have done in about twenty years. Also, this will likely work in older versions of OS X, but how far back, I do not know.

[crarko adds: I haven't fully tested this one. I had some problems working with the downloadable version, so I'd recommend creating the Service from scratch using the code above. I already have Xcode installed so I did not get the prompt to install it, as expected.]
  Post a comment  •  Comments (2)  
  • Currently 1.12 / 5
  You rated: 5 / 5 (100 votes cast)
 
[9,163 views] Email Article To a Friend View Printable Version
10.9: Run sysdiagnose with keyboard shortcut System 10.9
The command-line utility sysdiagnose can be triggered by pressing Cmd+Opt+Ctrl+Shift+Period, and it may take a few minutes to complete. When ready, the output will automatically be revealed in a Finder window (or it can be manually retrieved from /var/tmp).

What sysdiagnose Collects:
  • A spindump of the system
  • Several seconds of fs_usage ouput
  • Several seconds of top output
  • Data about kernel zones
  • Status of loaded kernel extensions
  • Resident memory usage of user processes
  • All system logs, kernel logs, opendirectory log, windowserver log, and log of power management events
  • A System Profiler report
  • All spin and crash reports
  • Disk usage information
  • I/O Kit registry information
  • Network status
  • If a specific process is supplied as an argument: list of malloc-allocated buffers in the process's heap is collected
  • If a specific process is supplied as an argument: data about unreferenced malloc buffers in the process's memory is collected
  • If a specific process is supplied as an argument: data about the virtual memory regions allocated in the process
The man page for sysdiagnose can be found here.

[crarko adds: This seems to be primarily intended for software developers as a debugging aid, but I can see it useful for system troubleshooting at a low level as well. I tried it and found the output (text) file in /var/tmp, as mentioned above.]
  Post a comment  •  Comments (5)  
  • Currently 2.83 / 5
  You rated: 1 / 5 (6 votes cast)
 
[8,370 views] Email Article To a Friend View Printable Version
10.9: Disable power button sleep System 10.9
Here is a way to disable sleeping when pressing the power button on 10.9.2. In Terminal, type in the following command and then press Enter.

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool no

This causes the 'Are you sure you want to shut down your computer now?' dialog to come up much quicker too.

[crarko adds: I tested this, and it works as described. I had to log out and log back in; I'm not sure if that's necessary.]
  Post a comment  •  Comments (9)  
  • Currently 3.90 / 5
  You rated: 1 / 5 (10 votes cast)
 
[9,226 views] Email Article To a Friend View Printable Version
10.9: Smart folders on the Dock System 10.9
In OS X 10.9 Mavericks a smart folder (or a saved search) dragged to the Dock behaves like a folder (smart folders by default are saved under ~/Library/Saved Searches). Right click gives sorting, display and viewing options similar to ordinary folders dragged to the Dock. A drawer icon is shown if Display as Folder option is selected. In grid view Quick Look works, too.

I did not check if it works under 10.8 or 10.7. I have to mention that there was already a hint about how to add 'recent things' stack to the Dock.

[crarko adds: I tested this, and it works as described.]
  Post a comment  •  Comments (1)  
  • Currently 2.29 / 5
  You rated: 1 / 5 (7 votes cast)
 
[6,175 views] Email Article To a Friend View Printable Version
10.9: Updating SSH private keys System 10.9
Here is a method for updating SSH private keys to work with OS X 10.9 Mavericks, using Terminal commands.
cd /Users/nameofuser/.ssh
cp id_rsa{,.bak}
chmod +w id_rsa id_rsa.pub
openssl rsa -in id_rsa -out id_rsa         # decrypt in place
openssl rsa -in id_rsa -aes256 -out id_rsa # encrypt in place
ssh-keygen -y -f id_rsa > id_rsa.pub       # regen public key
chmod 400 id_rsa id_rsa.pub
The source of this hint.

[crarko adds: I haven't tested this one. At least not yet. The solution seems to come from a question asked on StackExchange.]
  Post a comment  •  Comments (3)  
  • Currently 2.67 / 5
  You rated: 4 / 5 (6 votes cast)
 
[7,603 views] Email Article To a Friend View Printable Version
10.9: iOS Keyboard Shortcuts in OS X Mavericks System 10.9
I came across this by pure accident but did you know that all of your iOS Keyboard Shortcuts that you create are then stored to iCloud Keychain and can be used in OS X 10.9?

I was in iMessage when I accidentally typed "eag" which is a shortcut I have created to easily insert my work email in iOS. Well I typed that and pressed space and the text autofilled into the message. So then I went ahead and typed other shortcuts I actively use in iOS and sure enough, they all auto-complete very nicely. After noticing this, I went to System Preferences » Keyboard » Text and found an entire Menu that you can control this (and I assume will also sync to iCloud Keychain).

[crarko adds: I'm pretty sure I've seen this mentioned before, but in case it is a new and useful fact to somebody here it is.]
  Post a comment  •  Comments (3)  
  • Currently 3.75 / 5
  You rated: 4 / 5 (8 votes cast)
 
[6,945 views] Email Article To a Friend View Printable Version
Update bluetooth service in Mavericks System 10.9
I recently started having severely shortened battery life on my Magic Trackpad. It turns out the fix is pretty easy.

When researching the problem, I found the standard fix reported over the last few years was to "update service" in OS X's bluetooth preferences. Looking for that option in Mavericks proved fruitless. Finally, out of desperation, I selected the option to disconnect the trackpad, then re-associated it. Immediately, the day-old batteries showed a 100% charge instead of the prior 10% and I've had no problems since.
  Post a comment  •  Comments (6)  
  • Currently 1.64 / 5
  You rated: 1 / 5 (11 votes cast)
 
[10,186 views] Email Article To a Friend View Printable Version
10.9: Switch the SMB stack to use SMB1 as default System 10.9
The new SMB2 stack deliverd with OS X 10.9 (Mavericks) often fails to connect to NAS devices or behaves strangely on server volumes, such as an inability to change file/folder names.

Some possible workarounds are:

First try using cifs:// instead of smb:// to connect to the server volumes.

If that doesn't help, then there is a way to change all connections that use SMB1 by entering this command in Terminal:
echo "[default]" >> ~/Library/Preferences/nsmb.conf; echo "smb_neg=smb1_only" >> ~/Library/Preferences/nsmb.conf
To restore the default SMB2 you simply need to delete the newly created configuration file (nsmb.conf) with the command:
rm ~/Library/Preferences/nsmb.conf
Both workarounds force OS X to use SMB1 as a network protocol instead of the default SMB2 used by OS X 10.9 (Mavericks). While the first is an ad hoc solution the second is a persistent but reversible configuration change (for this user account). SMB1 is slower than SMB2 but stable.

[crarko adds: I don't have a way to test this at the moment, but I do recall reading that people have experienced some of these issues. If someone has a NAS device to test this with (especially if there have been problems) please let us know if either of these fixes helped.]
  Post a comment  •  Comments (12)  
  • Currently 2.25 / 5
  You rated: 2 / 5 (16 votes cast)
 
[31,852 views] Email Article To a Friend View Printable Version