Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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

 
discard

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.