Home > Archive > Unix Shell Programming > February 2005 > How to change the default shell csh->bash (not with administrator rights)?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to change the default shell csh->bash (not with administrator rights)?
|
|
| Eugen Meister 2005-02-09, 8:59 pm |
| As a normal user on a SunSolaris machine my normal shell is cshrc.
But i want to have the bash as default shell.
I cannot ask the administrator to change /etc/passwd where the default shell is entered.
The only way seems to me to enter something in .cshrc in my home directory to switch
automatically to bash at login time. However when I entered
bash
as the last command in the .cshrc it does not work.
Is there another way for me to switch to bash automatically ?
Eugen
| |
| Michael Vilain 2005-02-09, 8:59 pm |
| In article <cue1p8$nh4$00$1@news.t-online.com>,
e.meister@lycos.de (Eugen Meister) wrote:
> As a normal user on a SunSolaris machine my normal shell is cshrc.
> But i want to have the bash as default shell.
>
> I cannot ask the administrator to change /etc/passwd where the default shell
> is entered.
> The only way seems to me to enter something in .cshrc in my home directory to
> switch
> automatically to bash at login time. However when I entered
>
> bash
>
> as the last command in the .cshrc it does not work.
> Is there another way for me to switch to bash automatically ?
>
> Eugen
If you just run bash, it will run, then exit when your .cshrc exits.
Why not add
exec bash
to your .login file. Don't put it in .cshrc.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
| |
| Michael Vilain 2005-02-10, 8:58 am |
| In article <cue9ef$ba5$1@online.de>,
Janis Papanagnou <Janis_Papanagnou@hotmail.com> wrote:
> Eugen Meister wrote:
>
> You mean csh?
>
>
> On the Unix systems I know of there is the chsh command available
> for non-root users to change their login shell to any shell that
> is configured in file /etc/shells.
>
> So if bash is installed and defined in /etc/shells you would type
> once
>
> chsh /usr/bin/bash
>
> (or where else the shell resides) and you should be fine.
>
> Janis
chsh isn't native to Solaris. To change a Solaris user's shell, I've
either modified the /etc/passwd file or their entry in the NIS passwd
map. If your sy min has installed it, great. But it's not part of
Solaris last time I checked.
In an environment where we had standardized "dot" files and everyone got
/usr/bin/csh for their shell, we wouldn't change their entries in passwd
even if the manager said that it was OK. Any problems with compilers
and stuff not working and we'd be figuring out what crap they did in
their personal startup files. They were welcome to put
exec <whatever shell they wanted>
at the end of their .login-private file which we sourced at the end our
standard .login. This way, if they had problems all we had to do was
rename .login-private to .login-private-disabled and they could
logout/login and continue working.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
| |
| Kevin Collins 2005-02-25, 4:00 pm |
| In article <cue1p8$nh4$00$1@news.t-online.com>, Eugen Meister wrote:
> As a normal user on a SunSolaris machine my normal shell is cshrc.
> But i want to have the bash as default shell.
>
> I cannot ask the administrator to change /etc/passwd where the default shell is entered.
> The only way seems to me to enter something in .cshrc in my home directory to switch
> automatically to bash at login time. However when I entered
>
> bash
>
> as the last command in the .cshrc it does not work.
> Is there another way for me to switch to bash automatically ?
You can either use the "chsh" command which is designed to allow users to
change their own shell in /etc/passwd (remember to use the full path to bash -
something like /usr/bin/bash) or make the last line of your .login file be:
exec /path/to/bash
or possibly:
exec /path/to/bash -i
Kevin
|
|
|
|
|