Showing posts with label Mac OS X. Show all posts
Showing posts with label Mac OS X. Show all posts

Tuesday, May 17, 2016

Mac OS X - Active Directory Mobile Account

Use Command prompt and execute the following command:

/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount

usage: createmobileaccount -n username [-h homepath] [-P | [-p password]] [-e] [-q] [[-x] | [-X]] [[-s] | [-S]] [-u syncURL] [-t urlPath] [-d] [-v]
-n username : user record name.
-h homepath : user home path; Default is "/Users/<username>".
-p password : user password.
-P : prompt for user password. A user password is required to create a FileVault home.
-e encrypt : encrypt new home with FileVault.
-q quota : max size in bytes of FileVault home.
-x : create as external account on non-boot volumes. Default.
-X : create as mobile account account non-boot volumes.
-d : disable external account creation.
-s : set home sync on if home created.
-S : set home sync off if home created. Default.
-u syncURL : server target of home synchronization.
-t urlPath : additional path after syncURL.
-v : verbose output.
Examples:
createmobileaccount -n jsmith
createmobileaccount -v -P -n jsmith
createmobileaccount -vsxn jsmith -h /Volumes/HD3/jhome
createmobileaccount -vsxn jsmith -h /Volumes/HD3/jhome -u nfs:/server.apple.com/bigs/homes -t myusers/macos/jhome
Notes:
- createmobileaccount must run as root.
- If you do not specify a password, the account's cached password will be created during the account's first log in.

createmobileaccount -vsxn COYOTEID -h /Users/COYOTEID


The OpenDirectory cached the users password locally. To delete cached information that is no longer valid other than to delete the information, we had to delete the user while keeping the users homedirectory.

sudo dscl . -remove /Users/[username]
This will remove the user [username] from the userlist but keeps the homedirectory as it is.

Note: You should only do so with a cached mobile user!!!! To find out about your cached users run this snippet:


dscl . -list /Users AuthenticationAuthority | grep LocalCachedUser | awk '{print $1}'

Wednesday, February 25, 2015

Mac OS X - Change ComputerName/HostName/LocalHostName via the command line

ComputerName - Used for Computer Name, File Sharing, and AppleTalk.
scutil --set ComputerName "YourComputerName"

HostName - Displayed in the default terminal command prompt.(user@hostname).
scutil --set HostName "YourHostName"

LocalHostName - Used for Bonjour-aware services on the local network.
scutil --set LocalHostName "YourLocalHostName"


Wednesday, February 19, 2014

Mac OS X - Enable Screen Sharing (VNC) via the command line

The following command should be typed as one line of text.
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw VNCPASSWORD -restart -agent -privs -all

Thursday, January 23, 2014

Mac OS X - Install wget via the command line


curl -O http://rudix.googlecode.com/files/wget-1.12-0.dmg
hdiutil mount wget-1.12-0.dmg
sudo installer -package /Volumes/wget.pkg/wget.pkg -target "/Volumes/Macintosh HD"
hdiutil unmount "/Volumes/wget.pkg/"

Wednesday, January 8, 2014

Enable VNC Remote Controll Macbook Pro


1. Go to System Preferences -> Sharing -> Remote Management
2. Check "Allow access for All Users"
3. Click on "Computer Settings"
4. Check "Anyone may request permission to control screen"
5. Check "VNC viewers may control screen with password" (Enter your own password)
6. Hit "OK" and done.


Tuesday, September 10, 2013

Tricking your Mac into creating a new user account

  1. Power on or restart your Mac (should work for any Mac OS X system).
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. This step is optional, but it’s a good idea because it checks the consistency of the hard disk before moving on. At the prompt, type fsck -fy and press Enter/Return. Wait for the checks to complete before going to the next step.
  4. Type mount -uw / and press Enter.
  5. Type rm /var/db/.AppleSetupDone and press Enter.
  6. Type shutdown -h now and press Enter.

Monday, July 15, 2013

Safari - PDF Freezes/Craches

Due to : The default internet speed was set to 56 Kbps in Adobe Reader.

Solution:
Open up Adobe Reader
Click on Preferences > Internet
Adjust the Internet Connection speed.