3

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.

1
  • It's a surprisingly difficult question apparently. No one I know knows the answer. Commented Jan 3, 2014 at 21:06

1 Answer 1

1

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.

2
  • 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? Commented Aug 4, 2015 at 18:10
  • 1
    @peter turner it's whatever the output of getent passwd $username shows. Commented Aug 27, 2015 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .