The gradient corrected density functional theory (DFT) calculations were presented on the adsorption of both hydrogen and sulfur on pure Pd(111), Cu(111) and Au(111) surfaces, as well as on PdM3(111), Pd2M2(111), and Pd,M(111) surfaces. The most favorable adsorption sites, binding energies and the relaxation during adsorption were obtained with a coverage of 0.25. The Pd surface exhibited the strongest adsorption of both hydrogen and sulfur atoms. Cu was the next and Au had the weakest affinity with them. The binding energies of adsorption of hydrogen and sulfur on PdM alloys decreased with the increase of the concentration of metal M, except Pd,Au, in which case, the adsorption of hydrogen on Pd3Au (111) surface was even stronger than that on pure Pd, due to the larger lattice constant. According to the values of binding energy, it was found that the binding energies of both hydrogen and sulfur on PdAu decreased slower than that on PdCu, when the concentration of Au was lower than 25% (molar fraction). However, they decreased quickly when the concentration of Au exceeded 50%. PdAu alloy with 25%-50% Au was a promising candidate to resist sulfur and also with high performance in hydrogen permeation.