Adiabatic and diabatic potential curves are obtained for linear HCNH. The electronic states of this molecule are characterized by strong mixing of valence and Rydberg configurations. Molecular orbitals for these two classes of configurations are determined separately and then combined. Large scale calculations at the level of single and double excitations from a multi-configuration reference are performed. The calculations confirm the earlier results of Talbi & Ellinger (1998, Chem. Phys. Lett., 288, 155). Diabatic potential curves are determined using the block diagonalization method and are used to estimate the width Γ for electron capture by HCNH^+. Rates for dissociative recombination through the CH bond and through the NH bond (which lead to HNC + H and HCN + H, respectively) are calculated using a simple quasi-diatomic model. None of the calculated results suggests a strong difference in the rates for production of HNC and HCN.