>Date: Fri, 24 Apr 2009 11:17:18 -0700 (PDT) >From: Ray Abbitt <rabbitt+rh@xxxxxxxxxx> >On Fri, 24 Apr 2009, Dave Martini wrote: > >> I have user logging into a RHEL4 box that has a default shell of C Shell. >> >> I have a script in /etc/profile.d that is a Bash shell script with a .sh >> extension. >> >> Is there a way to have the users shell switched to bash shell when they log <snip> >Specify the shell to be used in the script. Make the first line of >your script: > >#!/bin/bash > The shell should ALWAYS be the first line. I, personally, would not accept one that didn't have that. Of course, I can't think of one I've seen that didn't. >There may already be a line specifying another shell. If so, delete >it. Make sure to substitute the proper path if bash is not in /bin. >Also note that the .sh extension is not really needed. That first is not a good idea. What works in one may not work in another. For example, if there's an old shell script in Bourne, that will gag on export HOTSHOT=/home/myself or alias h=history And the extension certainly isn't necessary; however, I normally do it as good practice, so that you know what it is without doing a file on it. mark -- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list