LDAP loginShell on platforms with different paths

Posted by neoice on Server Fault See other posts from Server Fault or by neoice
Published on 2011-03-13T07:17:50Z Indexed on 2011/03/13 8:11 UTC
Read the original article Hit count: 202

Filed under:
|
|
|
|

I'm using LDAP to deal with users and authentication across my network. I'm now adding FreeBSD hosts and have hit a problem with login shells. on Linux, shells tend to be in /bin/$shellname, so setting my login shell in LDAP to /bin/zsh works perfectly. on FreeBSD, /bin/zsh doesnt exist, I need to use /usr/local/bin/zsh. is there a solution to this? I imagine I might be able to make some sort of login-shell.sh script that LDAP passes out as the "shell" and then use the script to determine the actual shell for the user, but I'm not a fan of that idea.

I'm using Debian and FreeBSD, both with a standard OpenLDAP/PAM/nss setup.

edit: it looks like using /bin/sh and adding an exec $shell to .profile would "work", but that doesnt scale very well.

© Server Fault or respective owner

Related posts about debian

Related posts about ldap