Tuesday, May 9, 2017

OSX tips

 

  • restore from time machine image:
    Hold Command-R while boot
  • Hide user account: https://support.apple.com/en-us/HT203998
    From Admin terminal:
    # sudo dscl . create /Users/hiddenuser IsHidden 1
    
    unhide the account with:
    # sudo dscl . create /Users/hiddenuser IsHidden 0
  • Hide user account from login screen
    sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add user1 user2 user3 user4
    
    Delete hidden list
    sudo defaults delete /Library/Preferences/com.apple.loginwindow HiddenUsersList
    
  • setup static IP:
    sudo ipconfig set en1 INFORM 192.168.0.150

    Note: for whatever reason, when you are setting the IP address manually via the command line the Mac OS X Network Preferences doesn’t necessarily catch up to the changes.
  • enable vnc
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all
    disable vnc
    /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off