Can anyone tell me how to disable all usb-ports on OSX 10.10 (Yosemite)?
We've got a large number of iMacs setup, where we don't want the user to be able to control/use USB ports.
In previous OSX versions, the command was
cd /System/Library/Extensions
mv IOUSBMassStorageClass.kext/ IOUSBMassStorageClass.kext.bup
But this no longer works under Yosemite?
Eventually found a solution, i now use
cd /System/Library/Extensions/
sudo kextunload IOUSBMassStorageClass.kext
and after that all usbs are disabled.
Related
I installed Yosemite, and I would like to reset it to default settings and apps. I don't want to downgrade to Mavericks. Is there any other way than installing clean Mavericks and then upgrade back to Yosemite?
You've done a time machine backup? Then maybe you can make a bootable usb installer.
Have a look at: http://mac-how-to.wonderhowto.com/how-to/create-bootable-install-usb-drive-mac-os-x-10-10-yosemite-0155306/
I have OS X mavericks. Yesterday I installed xQuartz but then decided that I want to make Apple's X11 the default X11 eninronemnt. I check the website of xQuartz where it said I should run the following commands:
(XQuartz.app) launchctl unload -w /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
(Apple's X11.app) launchctl unload -w /System/Library/LaunchAgents/org.x.startx.plist
(MacPorts' X11.app) launchctl unload -w /Library/LaunchAgents/org.macports.startx.plist
The first command runs correctly, but the last two gives me that there's no such file or directory error. So now how can I make Apple's X11 the default?!
From XQuartz's faq:
Uninstall (Snow Leopard or Later)
XQuartz does not replace the system X11 on Snow Leopard, so you can go
back to the Apple-provided X11.app rather easily. Just launch X11.app
rather than XQuartz.app to get the older server. If you want to make
Apple's X11.app the default server (owning the launchd $DISPLAY
socket), then you should disable the
org.macosforge.xquartz.startx.plist as described in the first
question. After logging out and back in, Apple's X11.app will be
default. If you still want to remove XQuartz.app from your system, you
can do that with these two steps:
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
Please file a bug report
to let us know why you reverted to the system X11.app, so we can
address the problem in a future release.
Apple's X11 is no longer supported in Mavericks. You can run it but it may not work. Only xQuartz has been updated and supported up to Mavericks. The old apple's x11 no longer comes with the operating system. As a matter of fact, you can't install it unless you have access to an old install disk or obtain the file from someone else. Apple even suggests to install XQuartz instead. So unless you managed to install apple's old x11 by hand, that file shouldn't exist.
I'm using Mac OS X 10.9 with OSXFUSE 2.6.2. I've created 3 virtual drives. When I click the "Dismount All" button, it takes above 10 seconds to dismount all drives, but if I use the command line "/Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt -t --dismount", they are unmounted immediately. I have no idea why two versions behave so differently? I looked into the source code but didn't find any difference. Anyone can explain that? Thanks in advance!
Is there a way to sniff the USB port on a Mac? I've looked at libusb and #usblib but I can't find anything that works on the Mac.
I found a way, you'll need Wireshark's nightly build (I am using V2.5.0rc0). After you install it, you'll need to bring up the USB "interface":
sudo ifconfig XHC20 up
And after that you can use wireshark to sniff all the traffic in the XHC20 interface. When you finish, remember to turn the interface down:
sudo ifconfig XHC20 down
Source: aud-ios.
Beware when installing IOUSBFamily log. It has not been updated in a few years. The OS X versions must match or else all usb devices including builtin touchpad/keyboard could not work. If that does happen you must reload the proper kext manually from recovery:
https://discussions.apple.com/message/20152486#20152486
Here is the steps to reload from recovery:
I had the same issue after installing USB Prober from a wrong OS version on my machine. It installed without any warnings but it turned out that this includes IOSUSBFamily.kext kernel module that's not going to work on my machine and this disabled all the USB devices (which includes laptop's own keyboard and trackpad).
Here's how I fixed it, but please be extremely careful not to break your machine:
1) Hold CTRL+R and turn on your machine, this will boot into the "Recovery mode"
2) Open Terminal
3) Find out where is your original IOUSBFamily kernel extension and the one on the Macintosh HD are. Mine were here:
Original: /System/Library/Extensions/IOUSBFamily.kext
New one (broken): /Volumes/Macintosh\ HD/System/Library/Extensions/IOUSBFamily.kext
4) Move the broken module away:
$ mkdir /Volumes/Macintosh\ HD/Users/recovery-backup
$ mv /Volumes/Macintosh\ HD/System/Library/Extensions/IOUSBFamily.kext /Volumes/Macintosh\ HD/Users/recovery-backup
5) Copy back the original:
$ cp -a /System/Library/Extensions/IOUSBFamily.kext /Volumes/Macintosh\ HD/System/Library/Extensions/IOUSBFamily.kext
Reboot and it should be fixed.
You can use IOUSBFamily log. If you are on OSX 10.8.2, you'd probably want to try USB Prober included in Hardware IO Tools for Xcode, February 2012 (Apple Developer account required for both links), since the latest version of IOUSBFamily is for OSX 10.9.4.
Even now (in 2018) there are no newer releases than for 10.9.4, and they don't work in newer macOS releases.
Does anybody know if you can setup remote connections in gedit(on mac os x snow leopard), so I don't have to keep ftp'ing up seperately.
I know it can be done on Ubuntu but can't figure out how to do it on a mac, if even possible.
An application independent solution for this would be sshfs on OSX through MacFUSE. sshfs is also available for Linux.
This sshfs with a GUI is also available via MacPorts.
There is also a possibility of automatic upload after each file save in Transmit and in Cyberduck (FTP programs).