The effects of impurities and local structural defects on the conductance o
f metallic carbon nanotubes are calculated using an nb initio pseudopotenti
al method within the Landauer formalism. Substitutionally doped boron or ni
trogen produces quasibound impurity states of a definite parity and reduces
the conductance by a quantum unit (2e(2)/h) via resonant backscattering. T
hese resonant states show strong similarity to acceptor or donor states in
semiconductors. The Stone-Wales defect also produces quasibound states and
exhibits quantized conductance reduction. In the case of a vacancy, the con
ductance shows a much mon complex behavior than the prediction from the wid
ely used pi-electron tight-binding model.