In the state of California, landlords cannot enter their tenants room except under a small subset of reasons. Would a University (excluding campus police) renting rooms to students be able to search the rooms or would this violate California Civil Code 1954.
You have two questions here. A search by the government must be reasonable, under the 4th Amendment, meaning that a warrant is required or exigent circumstances must exist. Simple entering (without searching) is governed by Civil Code 1954. The law governing residential rentals is not explicit, because a a dormitory might be considered not to be a "residential dwelling unit". Some states explicitly exclude university dormitories, but that seems not to be the case in CA. There are some specific exclusions where dormitories are excluded (such as 1946.2 regarding termination), so the lack of an exclusion for dormitories can't follow from an assumption that a dormitory is not a residential dwelling unit. Clearly, a normal apartment that happens to be owned by the university and is rented out to students (as exist in many universities) clearly is an ordinary rental. So it seems that a dormitory is not legally exempted from 1954: they can only enter with permission or in specific circumstances.