how to change shell - Solaris

This is a discussion on how to change shell - Solaris ; Hi, I am using Solaris 10 x86, I am wondering how to change the default installation shell to tcsh. Thanks S...

+ Reply to Thread
Results 1 to 16 of 16

Thread: how to change shell

  1. how to change shell

    Hi,

    I am using Solaris 10 x86, I am wondering how to change the default
    installation shell to tcsh.

    Thanks
    S

  2. Re: how to change shell

    Pet wrote:
    > Hi,
    >
    > I am using Solaris 10 x86, I am wondering how to change the default
    > installation shell to tcsh.
    >
    > Thanks
    > S


    Hi, this is what I got after finished the installation (from CD1):

    # cd
    # ls -aCF
    ../ boot/ etc/ lib/ opt/ system/
    .../ cdrom/ export/ lost+found/ platform/ tmp/
    ..sunw/ dev/ home/ mnt/ proc/ usr/
    bin@ devices/ kernel/ net/ sbin/ var/
    #

    It looks like the root account doesn't have a *home*?

    Thanks
    S

  3. Re: how to change shell

    Pet wrote:
    > Hi,
    >
    > I am using Solaris 10 x86, I am wondering how to change the default
    > installation shell to tcsh.
    >

    Please explain what the "default installation shell" is.

    --
    Ian Collins.

  4. Re: how to change shell

    Pet wrote:
    > Hi, this is what I got after finished the installation (from CD1):
    >
    > # cd
    > # ls -aCF
    > ../ boot/ etc/ lib/ opt/ system/
    > .../ cdrom/ export/ lost+found/ platform/ tmp/
    > ..sunw/ dev/ home/ mnt/ proc/ usr/
    > bin@ devices/ kernel/ net/ sbin/ var/
    > #
    >
    > It looks like the root account doesn't have a *home*?
    >

    It does, /

    Not that you'll be using root much, will you?

    --
    Ian Collins.

  5. Re: how to change shell

    Ian Collins wrote:
    > Pet wrote:
    >> Hi,
    >>
    >> I am using Solaris 10 x86, I am wondering how to change the default
    >> installation shell to tcsh.
    >>

    > Please explain what the "default installation shell" is.
    >

    arh... it is the unix shell assigned to the root user after the
    installation is completed. In this case, I thought it will assign a csh
    to the root account, but it doesn't. I want to assign a tcsh to it, but
    I can't find a tcsh package. Where can I downnload this package?

    Thanks
    S

  6. Re: how to change shell

    Pet wrote:
    > I can't find a tcsh package. Where can I downnload this package?


    It's part of SUNWtcsh, which is installed by default in a full install.
    /usr/bin/tcsh.

    --
    Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/

  7. Re: how to change shell

    hume.spamfilter@bofh.ca wrote:
    > Pet wrote:
    >> I can't find a tcsh package. Where can I downnload this package?

    >
    > It's part of SUNWtcsh, which is installed by default in a full install.
    > /usr/bin/tcsh.
    >

    do you know how to change the shell in solaris?
    I tried to edit /etc/passwd, but not sure what command I can use to make
    the change take effective.
    Here is the root line in /etc/passwd:
    root:x:0:0:Super-User:/:/sbin/sh

    And I also found the PATH enviornment variable is not set properly, here
    is its current value:
    # echo $PATH
    /usr/sbin:/usr/bin

    When the tcsh is assigned to the user account, I will need to create a
    ..cshrc or .tcshrc file, where is a default .tcshrc or .cshrc file in
    solaris?

    Thanks
    S

  8. Re: how to change shell

    Pet wrote:
    > do you know how to change the shell in solaris?
    > I tried to edit /etc/passwd, but not sure what command I can use to make
    > the change take effective.
    > Here is the root line in /etc/passwd:
    > root:x:0:0:Super-User:/:/sbin/sh


    If you have to ask, don't change root's shell.

    --
    Daniel

  9. Re: how to change shell

    Pet wrote:
    > do you know how to change the shell in solaris?


    Yes. For normal users, it's "usermod -s ".

    For root, you'll need to use /usr/ucb/vipw and hand-edit the file. As soon
    as you save the file, the change is "in effect". Or, you'll have wrecked
    the system. One or the other.

    > I tried to edit /etc/passwd, but not sure what command I can use to make
    > the change take effective.


    Forgive me for saying so, but this level of inexperience tells me you really
    should NOT be mucking about in /etc/passwd. Yes, you can mess up root's
    shell, and newer versions of Solaris will save you. But...

    Until you get comfortable with vi and other very basic unix concepts, I'd
    recommend just starting your preferred shell by hand after su'ing to root.
    It may seem a hassle, but that's part of the point. Trying to make the
    root environment too comfortable by default indicates that perhaps too
    much is going on as root to begin with.

    > When the tcsh is assigned to the user account, I will need to create a
    > .cshrc or .tcshrc file, where is a default .tcshrc or .cshrc file in
    > solaris?


    You'll need to create one. tcsh should source /etc/csh.login, though.

    --
    Brandon Hume - hume -> BOFH.Ca, http://WWW.BOFH.Ca/

  10. Re: how to change shell

    On Feb 8, 5:49 am, Pet wrote:
    > hume.spamfil...@bofh.ca wrote:
    > > Pet wrote:
    > >> I can't find a tcsh package. Where can I downnload this package?

    >
    > > It's part of SUNWtcsh, which is installed by default in a full install.
    > > /usr/bin/tcsh.


    You can also a more recent version of tcsh at sunfreeware.org

    >
    > do you know how to change the shell in solaris?
    > I tried to edit /etc/passwd, but not sure what command I can use to make
    > the change take effective.
    > Here is the root line in /etc/passwd:
    > root:x:0:0:Super-User:/:/sbin/sh


    DO NOT CHANGE ROOT'S SHELL. Root needs to run scripts, such as
    startup scripts and cron scripts. If you muck with root's default
    shell, it will break many of these things.

    > When the tcsh is assigned to the user account, I will need to create a
    > .cshrc or .tcshrc file, where is a default .tcshrc or .cshrc file in
    > solaris?


    The standard SUNWtcsh package does not include a global default tcshrc
    file. You must create your own and park it in your home directory.

    I never bother putting a separate one in the root user's home
    directory. When you log in as your regular username and then su to
    root, it will use the .tcshrc files in your home directory
    automatically.

    --
    Andy


  11. Re: how to change shell

    quoting Pet (Thu, 08 Feb 2007 21:49:32 +1100):
    > hume.spamfilter@bofh.ca wrote:
    >> Pet wrote:

    > do you know how to change the shell in solaris?


    "passwd -e" will do the trick. Answer the Old shell / New shell question
    and you're done.

    However, pay close attention to the advice others have given.

    --
    Dick Hoogendijk -- PGP/GnuPG key: F86289CE
    ++ http://nagual.nl/ | Solaris 10 11/06 ++

  12. Re: how to change shell

    On Feb 8, 10:49 am, Pet wrote:

    > And I also found the PATH enviornment variable is not set properly, here
    > is its current value:
    > # echo $PATH
    > /usr/sbin:/usr/bin


    What do you think it should be?


  13. Re: how to change shell


    "Tim Bradshaw" wrote in message
    news:1170950107.794510.136810@k78g2000cwa.googlegr oups.com...
    > On Feb 8, 10:49 am, Pet wrote:
    >
    >> And I also found the PATH enviornment variable is not set properly, here
    >> is its current value:
    >> # echo $PATH
    >> /usr/sbin:/usr/bin

    >
    > What do you think it should be?
    >

    ..:/usr/lib/mpegs:/usr/sbin/downloads/new:/usr/lib/vids/newvids:/etc/thongs:/home/sounds/mp3/unsorted:/dev/piccies:/windows/system32/drivers/etc
    ....

    Thought everyone knew that.




  14. Re: how to change shell

    On Thu, 08 Feb 2007 07:22:30 -0800, AHinMaine wrote:

    > On Feb 8, 5:49 am, Pet wrote:
    >> hume.spamfil...@bofh.ca wrote:
    >> > Pet wrote:
    >> >> I can't find a tcsh package. Where can I downnload this package?

    >>
    >> > It's part of SUNWtcsh, which is installed by default in a full
    >> > install. /usr/bin/tcsh.

    >
    > You can also a more recent version of tcsh at sunfreeware.org
    >
    >
    >> do you know how to change the shell in solaris? I tried to edit
    >> /etc/passwd, but not sure what command I can use to make the change take
    >> effective.
    >> Here is the root line in /etc/passwd: root:x:0:0:Super-User:/:/sbin/sh

    >
    > DO NOT CHANGE ROOT'S SHELL. Root needs to run scripts, such as startup
    > scripts and cron scripts. If you muck with root's default shell, it will
    > break many of these things.
    >


    You *can* change the root shell

    It no longer breaks as in the past, and if it did it should be filed as a
    bug.

    With S10 you can happily change to /bin/ksh for instance.

    Please stop spreading old rumours :-)



    --
    Bruce

    "The internet is a huge and diverse community and
    not every one is friendly"
    http://www.ytc1.co.uk


  15. Re: how to change shell

    AHinMaine wrote:
    >DO NOT CHANGE ROOT'S SHELL. Root needs to run scripts, such as
    >startup scripts and cron scripts. If you muck with root's default
    >shell, it will break many of these things.


    FUD alert. Root's default shell has no effect on scripts, cron
    or otherwise.

    First read the FAQ, then change the shell:


    NFM

  16. Re: how to change shell

    On Feb 11, 5:02 pm, wrote:
    >
    > FUD alert. Root's default shell has no effect on scripts, cron
    > or otherwise.
    >
    > First read the FAQ, then change the shell:
    >
    >
    > NFM


    Thanks for the correction and linkage. I don't even remember where I
    got that information, other than that it was a long time ago.

    And your FUD detector needs work, since my erroneous caution obviously
    does not meet the definition. I was not actively promoting any fear,
    attempting to create uncertainty, or casting doubt upon anything.
    FUD != being wrong.

    --
    Andy


+ Reply to Thread