Results 1 to 10 of 10

Thread: Changing login shell

  1. #1
    Join Date
    Apr 2010
    Beans
    8

    Changing login shell

    How can I change my default (login) shell to /usr/bin/ksh from /bin/bash? Using chsh rejects ksh as a "valid" shell. I am running Ubuntu 12.04 and ksh installed on the machine satisfactorily. I can enter ksh by typing "ksh" at a bash prompt, but I want to open directly to ksh.

    Thanks in advance for the help.
    Last edited by lisati; August 31st, 2012 at 04:50 PM. Reason: More meaningful thread title

  2. #2
    Join Date
    Jan 2010
    Location
    Kolkata India
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Changing login shell

    Quote Originally Posted by grove001 View Post
    How can I change my default (login) shell to /usr/bin/ksh from /bin/bash? Using chsh rejects ksh as a "valid" shell. I am running Ubuntu 12.04 and ksh installed on the machine satisfactorily. I can enter ksh by typing "ksh" at a bash prompt, but I want to open directly to ksh.

    Thanks in advance for the help.
    checkout the ksh absolute path in your system.

    Code:
    grep ksh /etc/shells
    Now change your shell .
    Code:
    sudo chsh -s /bin/ksh your_username
    Now, logout and login back again to use ksh as the default shell.
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  3. #3
    Join Date
    Sep 2006
    Beans
    7,022
    Distro
    Lubuntu Development Release

    ksh in /etc/shells

    I notice in 12.04 that /bin/ksh is missing from /etc/shells. It needs to be added.

    That said, using usermod didn't complain when I changed my shell to ksh even though it was not in /etc/shells.

  4. #4
    Join Date
    Jan 2010
    Location
    Kolkata India
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: ksh in /etc/shells

    Quote Originally Posted by Lars Noodén View Post
    I notice in 12.04 that /bin/ksh is missing from /etc/shells. It needs to be added.

    That said, using usermod didn't complain when I changed my shell to ksh even though it was not in /etc/shells.
    You are correct Lars Noodén , i cannot find it listed on my Ubuntu server 12.04 's /etc/shells .

    still
    Code:
    which ksh
    returns it is /usr/bin/ksh .
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  5. #5
    Join Date
    Apr 2010
    Beans
    8

    Re: Changing login shell

    Thanks for all the good advice. I got it the way I want it now.

    Regards,
    Will Grove

  6. #6
    Join Date
    Jan 2010
    Location
    Kolkata India
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Changing login shell

    You are welcome and please dont forget to mark the thread as solved to help the next guy .
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  7. #7
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,297
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Changing login shell

    Quote Originally Posted by codemaniac View Post
    Now change your shell .
    Code:
    sudo chsh -s /bin/ksh your_username
    sudo is not needed if you are changing your own shell. And of course the rule about sudo is that if it is not needed, you don't use it.
    「明後日の夕方には帰ってるからね。」


  8. #8
    Join Date
    Jan 2010
    Location
    Kolkata India
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Changing login shell

    Quote Originally Posted by Bachstelze View Post
    sudo is not needed if you are changing your own shell. And of course the rule about sudo is that if it is not needed, you don't use it.
    The OP has not explicitly mentioned if he is about to change his own shell or some other users .So in this situation ,the intention was to come up with something that works in both the scenario .
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

  9. #9
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,297
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Changing login shell

    Quote Originally Posted by codemaniac View Post
    The OP has not explicitly mentioned if he is about to change his own shell or some other users.
    Yes, he has.

    Quote Originally Posted by grove001 View Post
    How can I change my default (login) shell to /usr/bin/ksh from /bin/bash?
    Besides, it's extremely rude to change another user's shell.
    「明後日の夕方には帰ってるからね。」


  10. #10
    Join Date
    Jan 2010
    Location
    Kolkata India
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Changing login shell

    Quote Originally Posted by Bachstelze View Post
    Besides, it's extremely rude to change another user's shell.
    Cummon , there are ample situations when a user is not enough privileged to change his shell
    (for security or other reasons), he needs to request a admin user to change his shell .
    “Progress is made by lazy men looking for easier ways to do things”
    — Robert A. Heinlein

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •