yum install ypchsh and yum install ldapmodify both don't find a package. I only want to change the shell for certain ldap users on this one server. Someone please help, I can't seem to figure this simple thing out. The passwd file won't work because the user isn't listed there I think. I don't just create an entry there I suppose. If I edit their login shell in their LDAP profile I think it would apply to all systems. There must be a mapping file somewhere -- in /etc I am guessing -- to map their attributes to local system settings.

  • It's a surprisingly difficult question apparently. No one I know knows the answer. – Gregg Leventhal Jan 3 '14 at 21:06

It was so easy, if your nsswitch is files ldap, you could just add an entry to /etc/passwd and modify their shell to whatever value. You cannot use useradd though, you would need to edit the passwd file with an editor like vi or use the vipw command.

  • This was my first instinct, but it doesn't appear so simple for me. Do you remember what you used for the UID and GID? – Peter Turner Aug 4 '15 at 18:10
  • 1
    @peter turner it's whatever the output of getent passwd $username shows. – Gregg Leventhal Aug 27 '15 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.