Setting the following Finder Preferences enables the specified drives to be shown on the Desktop, the same as going to Finder, Preferences, General and ticking the boxes
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true
defaults write com.apple.finder ShowMountedServersOnDesktop -bool true
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true
To set it so that a New Finder Window shows your home folder, enter the following into Terminal
defaults write com.apple.finder NewWindowTarget PfHm
To ensure that your machine is secure, enable a password prompt by typing the following into Terminal
defaults write com.apple.screensaver askForPassword -int 1
To set a delay on it before it becomes active, type the following into Terminal
defaults write com.apple.screensaver askForPasswordDelay -int 300
The delay is in seconds, so the command above sets it to 300 seconds, or 5 minutes
This one is personal preference, but I can’t stand the unnatural ‘natural’ scrolling option, so I disable it on all of my machines, to do this from the command line, enter the following into Terminal
defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false
To enable scroll bars in Finder, enter the following into Terminal
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"
This is the same as going to System Preferences, General and then choosing the radio button next to ‘Show Scroll bars’
To enable Remote Management from the command line, enter the following into Terminal
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -users ARDADMIN -access -on -restart -agent -privs -all -allowAccessFor -specifiedUsers -computerinfo -set1 -1 "INFO1" -set2 -2 "INFO2" -set3 -3 "INFO3" -set4 -4 "INFO4"
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart --configure -access -on -privs -all -users ARDADMIN
You will need to switch ARDADMIN for the account you wish to give ARD access to.
INFO1, INFO2, INFO3, INFO4 refer to the fields located in System Preferences, Sharing, Remote Management, Computer Settings
To enable SSH for one specific user, enter the following into Terminal
sudo systemsetup -setremotelogin on
sudo dseditgroup -o create -a USER -t user -u USER -q com.apple.access_ssh
You will need to change USER for the shortname of the user you wish to grant SSH access to.