I have both a USB hub that has a flash USB and an external USB drive. A family member often pulls it out without ejecting, and I'm trying to ease the effects of that. I put an AppleScript on the Desktop in hopes that they'll use it, and am now looking for auto-eject of both drives upon logoff. It's not foolproof, but better than nothing.

Does anyone have a good overall solution to this problem--and more specifically, can someone tell me if the drives are ejected upon logout?

  • 1
    Welcome to Ask Different! :) Just to clarify, by logoff and logout you're meaning just that, not actually shutting down? Also, assuming that's what you mean, are other user accounts also logged in at the time, or are we talking a single user scenario?
    – Monomeeth
    Jun 20, 2018 at 4:57

1 Answer 1


This answer assumes by logoff/logout you're meaning the Log Out option under Apple > Log Out and not shutting down your Mac.

By default the behaviour of macOS High Sierra is to unmount all volumes except for the boot volume.

However, if more than one user is logged in, then all volumes remain mounted so that they're still available to the other users.

NOTE: The above behaviour is the same regardless of any network file sharing that is active. That is, if a user is connected to your Mac via file sharing (e.g. SMB etc) this does not change the default behaviour above. They would still be able to access the boot volume of your Mac (even if you're logged out) but they will no longer be able to access other volumes.

Shutting down

[This edit explains what happens if you shut down your Mac instead of logging out]

In all situations of a normal1 Mac shutdown any mounted drives will be unmounted/ejected and no longer available (assuming those drives are connected to that Mac in the first place).

This means that any:

  • internal drives (SSD or HDD) will be unmounted upon a shutdown
  • external drives connected directly to the Mac via USB/Firewire/Thunderbolt etc will be unmounted/ejected upon a shutdown
  • external drives connected directly to the Mac via a hub (e.g. a USB hub) will be unmounted/ejected upon a shutdown
  • external drives not connected directly to the Mac (i.e. they're being shared on a network by another device) will be unmounted from that Mac upon shutdown but are still available on the network to other devices that also access those volumes.

It's important to note, however, that just because a volume is unmounted/ejected doesn't necessarily mean that it's powered down. If the volume is USB powered (i.e. it is powered by its USB connection, not by another power source) then it will be powered off upon a shutdown. However, if it has its own power supply and/or is connected via a powered hub, the drive may remain powered up. If this is the case it still isn't accessible and also shouldn't pose any problems - but nevertheless it's an important distinction to make.

1. By a 'normal' shutdown I mean you have shut down the computer normally (e.g. Apple > Shut Down) and not because of a power failure or forced shutdown. In the case of a power failure or forced shutdown any mounted drive will still be unavailable (unless it's a network drive shared by another device) but it won't have gone through the proper unmount/eject procedure. In these instances it is possible for data loss or corruption, and in very rare cases for damage to the physical drive itself.

  • I know it wasn't the question. But what about Shutting Down? Will it still eject?
    – JBis
    Jun 23, 2018 at 20:15
  • Also what about a force shutdown (holding the power button until it completely shuts down).
    – JBis
    Jun 23, 2018 at 20:17
  • 1
    @JBis Good questions and no reason for me not to cover this in my answer anyway, so I've done just that! Thanks for asking! :)
    – Monomeeth
    Jun 24, 2018 at 23:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .