Enterobacter species are beneficial commensals of C. elegans. Disruption of TGFbeta signaling impairs immune control, causing an Enterobacter bloom (but not of other gut bacteria), and turns a beneficial commensal to an opportunistic pathogen.