Ohm's law states that the current passing through a conductor is directly proportional to the voltage applied across it, given the temperature and other physical conditions remain constant.
Among the given options, only "all metals" obey Ohm's law. This is because metals have a linear relationship between their resistance and the applied voltage, meaning that the resistance of a metal remains constant regardless of the voltage applied. As a result, the current passing through a metal is directly proportional to the voltage applied, following Ohm's law.
On the other hand, a diode, all electrolytes, and glass do not obey Ohm's law. A diode is a semiconductor that has a non-linear current-voltage relationship, and its resistance is not constant. Similarly, electrolytes and glass are non-metallic substances that do not have a linear relationship between their resistance and the applied voltage. Their resistance can change significantly with the voltage applied, and hence they do not follow Ohm's law.