[clue-tech] Question for script wizards

jacob jborer at gmail.com
Thu Apr 9 16:33:59 MDT 2009


On Thu, Apr 9, 2009 at 3:59 PM, Sean LeBlanc <seanleblanc at comcast.net> wrote:
> Is it possible to configure a login based on where one logs in from?
>
> Let's say I have remoteuser on remotehost.
>
> I want the default shell to be different if I ssh in from machine "foo" vs.
> what the shell would be coming from machine "bar".

Two solutions spring to mind - adding something in the base shell's
config files to exec a shell based on what the result of "who am i |
perl -lpe 's/.*\((.*)\)/\1/' " (probably in a case statement), or
setting up a second user with the same uid and home dir but with a
different login shell.

Jacob


More information about the clue-tech mailing list