Posts

Showing posts with the label osx

Command line restart of dsmcad service on OS X

From here To start the client acceptor daemon use the following command: sudo /sbin/SystemStarter start dsmcad To restart the client acceptor daemon use the following command: sudo /sbin/SystemStarter restart dsmcad To stop the client acceptor daemon use the following command: sudo /sbin/SystemStarter stop dsmcad

Time machine backups fail on new Toshiba drive

I did not develop this solution on my own. I found it in the Apple discussion forums , specifically this thread . Here are the details. I purchased a new external drive, the Toshiba Canivo Basics 1.5TB model number  HDTB115XK3BA at Best Buy. I then follow the directions here to copy my old backup to the new drive. I went to back it up after the transfer and it immediately failed. The transfer had completed while I was at work so it had been 6+ hours since the transfer completed. That was plenty of time for the new hard drive to go to sleep. Turns out this is a habit of Toshiba drives from what I've been reading. I unchecked the option Put the hard disk(s) to sleep when possible in System Preferences/Engergy Saver and rebooted but that didn't fix the problem. I then came across a post about creating a crontab job to touch a file every minute to keep the drive away. Brilliant. So I now have the following crontab job that runs as the user I log in with every day. * * * * * to...

Backup script for Linux or OS X

A simple backup script for backing up my laptop. I have an OS X and Linux laptop so I wanted one script to put on both of them: #!/usr/bin/env homedir="$(echo $HOME)" dom=$(date +%d) ################### # START CONFIGURATION ################### # On the 15th of the month run an rsync --delete to clean out old file. Otherwise just run a regular rsync. if [ ${dom} -eq 15 ]; then   rsynccmnd="rsync --delete -avhz --stats --progress" else   rsynccmnd="rsync -avhz --stats --progress"fi # Path to the exclude file host=$(uname -a|cut -d ' ' -f 1) if [ "${host}" = "Darwin" ]; then  # OS X  excludefile="path to exclude file for OS X"  #EXAMPLE  # excludefile="${homedir}/Documents/Backup/backuplaptop_exclude_osx.txt" else  # Linux  #excludefile="path to exclude file for Linux"  #EXAMPLE  # excludefile="${homedir}/Documents/Backup/backuplaptop_exclude_linux.txt" fi # ...

FTP and OS X

Just ran into something I haven't seen before. I was attempting to upload information to an ftp site. I opened Finder, entered ftp://sitename, and a connection was made and a new finder window opened. Tried to rsync in a terminal over to the /Volume/sitename but was told it was read-only. Same result when dragging and dropping in Finder. Ran ftp sitename from a Terminal and it all worked. I was able to put files on the server. Guess I need to lookup up and figure out what in the heck Finder does different than command line ftp. UPDATE: Ok, after some searching I learned Finder mounts FTP as read-only. Don't know why but at least I now know.

Unable to join Mac Lion 10.7.3 client to an active directory domain

Kept receiving the error using the GUI, "the plugin has encountered an error processing request". On the command line I'd get that plus the 10001 error code. My domain admin account would not work but a coworkers would. The difference? My account had the box checked "Do not require Kerberos preauthentication". As soon as that was unchecked, I was able to use my domain admin account to bind a 10.7.3 machine to an Active Directory Domain. Note that my admin account had worked on binding 10.x machines BEFORE 10.7 just fine with that box checked. We had that box checked because we have Linux machines that authenticate off our active directory domain and for accounts to authenticate, they needed that box checked.

Right side of OS X menu bar frozen, take two

So there's a command line solution to a frozen right side menu bar in OS X that I posted about a while back. You can also fix it using a gui if you are so inclined. 1. Open Activity Monitor from /Applications/Utilities 2. Find process name SystemUIServer 3. Click Quit then Force Quit Right side of menu bar should now restart

/var/audit filling with files on OS X

Coworker discovered that installed antivirus software enabled auditing, for real time auto-protect, which results in /var/audit filling up with files. Details about the configuration file and related commands can be found here: https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man5/audit_control.5.html

Restart VMware Fusion from the command line

Via : http://communities.vmware.com/thread/195941 sudo /Library/Application\ Support/VMware\ Fusion/boot.sh --restart

Remote Management OS X command line

Via: http://support.apple.com/kb/HT2370# To enable Remote Managment: /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate To disable Remote Management: /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart - deactivate

Terminal title in OS X

I did not come up with this. A quick google search turns up multiple ideas. I combined a few and trimmed things down to how I wanted the title to look. Here's my final result: case $TERM in   (xterm*)   export PROMPT_COMMAND='echo -ne "\033]0;${USER}@$(hostname -s)\007"'   ;; esac I added that code to ~/.bash_profile. Now my Terminal title changes when I open a Terminal or ssh into a machine then exit back to my Mac.

Unable to log into OS X

Ran into a problem with being unable to log into an OS X machine joined to an AD domain. I had previously logged in successfully with this account. Logged in as a local administrator on the machine and noticed the account was no longer listed in System Preferences/Accounts but other domain accounts were, odd.  Ran dscl . -list users and the account was listed. There was also a directory structure under /Users/userid. Ran dscl . -delete /Users/userid and was then able to successfully log in and the home directory was untouched so no data was lost.

Burn OS X Lion DVD

Here Nuts and bolts: 1. Once you've pulled Lion down from the Mac App Store, right-click on the installer and select the option "Show Package Contents." This is your Mac's way of tearing the wrapping off a virtual install disk to access all the shiny bits (aka "files") inside. 2. Open the "Contents" folder, then look for a "SharedSupport" folder and open that. Inside, you'll find something called "InstallESD.dmg." This is the money file we're looking for (or the "master control program" if you're a Tron wonk). 3. Copy that file ("InstallESD.dmg") to a folder outside of the installer (your desktop works). 4. Open the "Utilities" folder on your Mac and launch "Disk Utility." 5. Select "Burn" from the "Images" menu option, or just click the yellow and black icon on the menu bar (which, disturbingly, looks just like the official symbol for nucle...

OS X right side of menu bar frozen

I am having a problem with my Mac where the right side of the menu bar will freeze when I run VMware. The problem is that my clock freezes and I lose track of time. While this isn't a solution for the overall problem, I found a fix that allows me to reset the menu bar and get my clock back on track. Simply run the following command in a Terminal: killall SystemUIServer

Stop OS X bouncing Dock icons

Hallelujah! These drive me nutty some times. Highlights: Open Terminal  defaults write com.apple.dock no-bouncing -bool TRUE  killall Dock To reenable: Open Terminal  defaults write com.apple.dock no-bouncing -bool FALSE  killall Dock Source

OS X boots to grey screen with spinning disc

Recent went through a scenario where I was turning a MacBook Pro into a fashionable brick. Install OS, completely update, apply a bunch of new settings & software, reboot, and fu.... Grey screen with spinning disc. I'd diligently boot into my install DVD, repair disk(saw errors about file and directory counts and fix them), repair permission, reboot, and fu... Repeat process. I finally figured out that /System/Library/LaunchDaemons will read every file in that directory upon boot, even if it doesn't end with .plist. I didn't want to fubar any of the files in that directory so I would create a backup copy of the file I was working with and would save them in that directory and end the file with .ORIG Turns out that upon boot both files were bumping into each other and the machine would not boot. Finally moved my backup file into /Users/Shared and the machine boots. So don't keep backup copies of files in /System/Library/LaunchDaemons, store them somewhere else.

rsync from iTunes dir to SD card

So I'm using rsync to get music from my Mac to the SD card in my Samsung Intercept. I don't want all my music, I want to pick and choose. I'm using the following as my rsync command: rsync -hrltvz --modify-window=1 --exclude-from=exclude-from-file My exclude-from-file looks like this: - *.m4p - *.wav - *.DS_Store + Blue October/*** - * The final - * tells rsync to skip everything. The only thing that is copied over is the Blue October directory and everything under that directory. Any .m4p, .wav, and .DS_Store files are also excluded. To add a new artist for syncing I just add a line + artist/*** to the exclude file.

rsync to SD card recopying files

I was trying to rsync some iTunes music to an SD card from my Mac. All was working well but all the files were being synced each time. Turns out it's an issue with a Microsoft(FAT32) formatted card, which my Samsung Intercept has. Answer was to add --modify-window=1 as an rsync option. Solution here .

SSH from OS X to Juniper firewall

Had to redo my Mac recently and started having problems with ssh to a Juniper firewall. I could ssh into the firewall but would be dropped 30 seconds later. Took me a while to get the search terms right but eventually found this post explaining the situation. The problem was I had a custom ssh config file in ~/.ssh/config and had ServerAliveInterval set to 30(ServerAliveInterval=30). Had to add an extra rule for the firewall and set that value to 0.