The Salmonella ugd gene is required for the incorporation of 4-aminoarabinose in the lipopolysaccharide and resistance to the antibiotic polymyxin B. Transcription of the ugd gene is induced by Fe3+ via the PmrA-PmrB two-component system and by low Mg2+ in a process that requires the PhoP-PhoQ two-component system, the PhoP-activated PmrD protein and the PmrA-PmrB system. Here, we establish that mutation of the tolB gene promotes ugd transcription independently of both the PhoP-PhoQ and PmrA-PmrB systems. This activation is mediated by the RcsC-YojN-RcsB phosphorelay and the RcsA protein, suggesting a role for ugd in capsule synthesis. Binding sites for the RcsB, PmrA and PhoP proteins were identified in the ugd promoter. Although the PmrA-PmrB and RcsC-YojN-RcsB systems promoted ugd transcription independently of the PhoP-PhoQ system under different environmental conditions, ugd expression inside macrophages was strictly dependent on PhoP-PhoQ, suggesting that low Mg2+ is a cue for the intracellular environment.