Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Debian: recover standard shell
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Debian: recover standard shell

trexostrexos Member
edited February 2014 in General

Hello,

I was playing a bit with shells on my Debian 7 server, but somehow I messed it up with one user. It looks like that:


login as: user

[email protected] password:

Linux vserv06 2.6.32-042stab083.2 #1 SMP Fri Nov 8 18:08:40 MSK 2013 x86_64

The programs included with the Debian GNU/Linux system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

Last login: Thu Feb 13 20:32:02 2014 from 123123.dyn.telefonica.de

$



Before I did that it looked like that:

login as: root

[email protected] password:

Linux vserv06 2.6.32-042stab083.2 #1 SMP Fri Nov 8 18:08:40 MSK 2013 x86_64

The programs included with the Debian GNU/Linux system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.

Last login: Thu Feb 13 20:25:39 2014 from 123.dyn.telefonica.de

root@vserv06:~#

I read that the default shell is dash, so I tried this: usermod -s /bin/dash But it doesn't change anything. The thing is, I have a problem with connecting to the server over SFTP with this specific user and I think it has something to do with that.

Thank you :)

Comments

  • try with

    chsh -s /bin/bash

  • @MuZo said:
    try with

    chsh -s /bin/bash

    That worked! It looks like the root shell. But why does my debian 7 use bash instead of dash?

  • You can also set bash to be the default: dpkg-reconfigure dash and you select bash.

  • trexostrexos Member
    edited February 2014

    @agonyzt said:
    You can also set bash to be the default: dpkg-reconfigure dash and you select bash.

    bash = sh?
    I didn't change anything, I just use the default openvz templates with my providers and the design looks always like this: root@vserv06:~# so they all use bash instead of dash?

  • perennateperennate Member, Host Rep
    edited February 2014

    dash is a shell, it doesn't have much functionality, if you don't want to use dash then use bash..

    Most operating systems install with bash as the default shell.

  • @perennate said:
    Most operating systems install with bash as the default shell.

    But if you use Ubuntu, default shell is dash.

  • It's odd, when I change the shell with usermod -s /bin/bash it doesn't work. But with chsh -s /bin/bash and relogin it does. Can somebody explain me that?

  • I just want to clear up some misconceptions about shells in Debian/Ubuntu. When dash is mentioned as being "the default shell" in Debian/Ubuntu, they do not mean that it's the default shell that you use when you log in. What they mean is that dash is used as /bin/sh, which is the main shell used for system scripting - primarily scripts that run at boot. dash is used for this purpose because it's much smaller and faster than bash, but the drawback is that dash doesn't support all of the things that bash does. Fortunately, the more advanced features of bash are usually not needed for these kinds of scripts. Bash is, and probably always will be, the default login shell for users in Debian/Ubuntu.

    trexos said: It's odd, when I change the shell with usermod -s /bin/bash it doesn't work.

    You might need to specify the username after the shell.

    Thanked by 1agonyzt
  • @NickM said:
    I just want to clear up some misconceptions about shells in Debian/Ubuntu. When dash is mentioned as being "the default shell" in Debian/Ubuntu, they do not mean that it's the default shell that you use when you log in. What they mean is that dash is used as /bin/sh, which is the main shell used for system scripting - primarily scripts that run at boot. dash is used for this purpose because it's much smaller and faster than bash, but the drawback is that dash doesn't support all of the things that bash does. Fortunately, the more advanced features of bash are usually not needed for these kinds of scripts. Bash is, and probably always will be, the default login shell for users in Debian/Ubuntu.

    You might need to specify the username after the shell.

    Thank you for the explanation! Of course I tried it with my root account:
    usermod -s /bin/bash USERNAME

Sign In or Register to comment.