Perhaps my google kungfu is not doing great today, but I found ways to apparently do this for each user (one by one) on the client side, or even a way to do it from the ldap side with ldapmodify again one by one.

What I am trying to setup is ssh based LDAP login, and its working sorta, still need to restrict to groups, but thats another topic, but as of now, the default shell is /bin/sh. I don't see an option in PHPLDAPADMIN for /bin/bash.

The /bin/sh is really crippling since there is no tab completion, that is the first thing I noticed and I'm sure there is more.

How can I change the default shell for all PosixAccount's for be /bin/bash from the LDAP server so that It doesn't need to be configure on a per-user basis or per-client basis. If not possible, how can I globally change it on the client side. I/We only manage say 50 servers, so its not impossible to add that step to LDAP integration, but for tidyness and properness, I feel it should be done from the LDAP Server.

  • What is your OS platform? (OS and version; eg RedHat 6, Debian Jessie) Commented Sep 14, 2016 at 21:25
  • Ubuntu 14.04 with OpenLDAP (sldap) + phpldapadmin Commented Sep 15, 2016 at 1:04

1 Answer 1

sudo nano /etc/phpldapadmin/templates/creation/posixAccount.xml

The Home Directory isn't really part of the question :P, but its the only two things I modified, and I figured I'd include it! Works great now though! But for users whom have already logged into server, it didn't retroactivly fix it, even if I changed the values in phpldapadmin, they still got the old home dir and /bin/sh.

<attribute id="homeDirectory">
    <display>Home directory</display>
    <!-- <onchange>=autoFill(homeDirectory;/home/%gidNumber|0-0/T%/%uid|3-%)</onchange> -->
<attribute id="loginShell">
    <display>Login shell</display>
    <!-- <value><![CDATA[=php.PickList(/;(&(objectClass=posixAccount));loginShell;%loginShell%;;;;loginShell)]]></value> -->
    <value id="/bin/sh">/bin/sh</value>
    <value id="/bin/csh">/bin/csh</value>
    <value id="/bin/tsh">/bin/tsh</value>
    <value id="/bin/bash">/bin/bash</value>
  • Technically, this still needs to be configured on a per-user basis, but its centrally configured, which is what I meant really. I suppose I could remove the other entries, or somehow make it default, but its good enough for me to have the option available now. Commented Sep 18, 2016 at 20:06

You must log in to answer this question.

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