Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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.

share|improve this question
up vote 3 down vote accepted

You could create a directory /shell on each machine with symbolic links to the locations of the shells. That way the users that interest you could have a shell of /shell/zsh, /shell/bash and so on while the symbolic links locally take care of the actual location problem.

share|improve this answer
I like this idea because it matches with Puppet well. just add /shell and symlink creation to the $operatingsystem configs I aready run. – neoice Mar 13 '11 at 13:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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