showmount -e 192.168.1.1/etc/exports line on linux (share /blah with 192.168.1.2)
/blah 192.168.1.2(ro)On the mac the options format is different. As with linux, root_squash to nobody is the default.
/blah -ro 192.168.1.2
showmount -e 192.168.1.1/etc/exports line on linux (share /blah with 192.168.1.2)
/blah 192.168.1.2(ro)On the mac the options format is different. As with linux, root_squash to nobody is the default.
/blah -ro 192.168.1.2
sudo sh setuptools-0.6c11-py2.X.eggand from then on it is the same as for linux
sudo easy_install pip sudo pip install virtualenvCreate a virtualenv instance:
virtualenv ENVand you'll get something like:
Could not call install_name_tool -- you must have Apple's development tools installedSo you need to go off and install XCode, which will probably take a while (4.2 is 1.7 G).
$ virtualenv ENV New python executable in ENV/bin/python Installing setuptools............done. Installing pip...............done. $ source ENV/bin/activate
launchctl listStart:
sudo launchctl load /Library/LaunchDaemons/com.myorg.somejob.plistStop:
sudo launchctl unload /Library/LaunchDaemons/com.myorg.somejob.plist
<dict> <key>Disabled</key> <false/> <key>Label</key> <string>com.myorg.somejob</string> <key>Program</key> <string>/usr/local/sbin/somejob</string> <key>Sockets</key> <dict> <key>Listeners</key> <dict> <key>SockServiceName</key> <string>9999</string> </dict> </dict> <key>inetdCompatibility</key> <dict> <key>Wait</key> <false/> </dict> </dict>
dscl . -mcxread /Computers/local_computerBut they don't get propagated to the relevant plists under managed preferences until a logout or reboot happens. You can check the managed preferences plists like this:
defaults read /Library/Managed\ Preferences/com.apple.loginwindowFortunately on 10.6 and later, you can run mcxrefresh to force this propagation without a reboot:
sudo mcxrefresh -n myusername
exec { 'something': # This has to be a double quote for the fact to get expanded command => "/usr/bin/something ${my_custom_fact}", refreshonly => 'true', }
"app": { "launch": { "web_url": "https://mail.google.com/mail/mu/?mui=ca" }, "urls": [ "https://mail.google.com/mail/mu/" ] },These don't seem to appear anywhere in the UI apart from when you open a new tab (there is no about:apps, see about:about for a full list of what is available).
"theme": { "colors": { "bookmark_text": [ 105, 96, 87 ], "frame": [ 92, 82, 73 ], "ntp_background": [ 235, 234, 211 ], "ntp_link": [ 105, 96, 87 ], "ntp_section": [ 158, 163, 139, 1 ], "ntp_section_link": [ 105, 96, 87 ], "ntp_section_text": [ 105, 96, 87 ], "ntp_text": [ 105, 96, 87 ], "tab_background_text": [ 255, 255, 255 ], "tab_text": [ 255, 255, 255 ], "toolbar": [ 158, 163, 139 ] },
"name": "__MSG_some_name__",Which means you need to go look in the relevant locale file like _locales/en/messages.json to find the actual name, it will look like this (note MSG and underscores stripped):
{ "some_name": { "message": "My Rad Extension" } }The exception is if it is a theme, the messages.json file will look like:
{"themeName": {"message": "Earthy", "description": "theme name"}}Except it also has a UTF-8 Byte Order Mark prepended to the start of the file, which is the three bytes 'ef bb bf'. If you're trying to parse it with an external JSON parser, those bytes might cause it to fail.
mount -uw /Then you need the daemon loaded. On snow leopard:
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plistAnd on Lion:
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist
scutil --dnsYou can check out the mDNSReponder config with:
defaults read /System/Library/LaunchDaemons/com.apple.mDNSResponderWhich, incidentally, is the place to add -NoMulticastAdvertisements to disable bonjour.
$ dscacheutil -q host -a name slashdot.org name: slashdot.org ip_address: 216.34.181.45 $ dscacheutil -q host -a ip_address 216.34.181.45 name: slashdot.org alias: 45.181.34.216.in-addr.arpa ip_address: 216.34.181.45
sudo killall -INFO mDNSResponderYou can also turn on (very verbose) DNS logging into system.log:
sudo killall -USR1 mDNSResponderOr even turn on packet capture with:
sudo killall -USR2 mDNSResponderYou can see the other (non-DNS) caching in the local directory service with:
dscacheutil -statistics dscacheutil -cachedump -entries
$ dscl localhost -read /Search CSPSearchPath: /Local/Default /BSD/local /LDAPv3/main.ldap.example.com DHCPLDAPDefault: off LSPSearchPath: /Local/Default /BSD/local NSPSearchPath: /Local/Default /BSD/local ReadOnlyNode: ReadOnly SearchPath: /Local/Default /BSD/local /LDAPv3/main.ldap.example.com SearchPolicy: dsAttrTypeStandard:CSPSearchPathThe SearchPolicy tells you which one will be used - in this case the Custom Search Path or CSPSearchPath (LSPSearchPath and NSPSearchPath are read-only), which will look in /Local/Default then /BSD/local then in the LDAP server main.ldap.example.com. This is roughly the equivalent of nsswitch.conf on linux. You can also see the same information in Directory Utility:
"/System/Library/CoreServices/Directory Utility.app/Contents/MacOS/Directory Utility"This app is used to configure the services that the mac will talk to for authentication (LDAP, NIS, Local, AD etc.), you can access that config on the command line with:
sudo defaults read /Library/Preferences/DirectoryService/DirectoryServiceAutomounts are kept in /etc/auto_master and you can get it to look in LDAP for the mounting info by adding '+auto_master' to the config. It will look for an automount map (see /etc/autofs.conf for more configuration options):
dn: ou=auto.master,ou=automount,ou=admin,dc=example,dc=com ou: auto.master objectClass: top objectClass: automountMapAnd shares identified by cn:
dn: cn=/home,ou=auto.master,ou=automount,ou=admin,dc=example,dc=com cn: /home objectClass: top objectClass: automount automountInformation: -nosuid home.nfs:/homeYou can dump a full list of shares with a LDAP search like this:
ldapsearch -LLLx -b ou=auto.master,ou=automount,ou=admin,dc=example,dc=comor via dscl like this:
dscl localhost -readall /LDAPv3/main.ldap.example.com/Automount