Need help after changing shell

General support questions
Post Reply
GauravBisht
Posts: 1
Joined: 2019/03/17 13:32:22

Need help after changing shell

Post by GauravBisht » 2019/03/17 14:02:26

Hi guys,

I am new here so, don't know how to start a discussion here but I recently changed my SHELL to korn from bash in both normal user & root.

Now I am not able to log in to any of them. Any assistance will be really appreciated.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Need help after changing shell

Post by TrevorH » 2019/03/17 14:15:58

What did you change and how? What exactly did you do to change the shell?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tunk
Posts: 1206
Joined: 2017/02/22 15:08:17

Re: Need help after changing shell

Post by tunk » 2019/03/18 10:44:22

I don't think ksh is installed by default.
If you haven't installed it, then you may have to update /etc/passwd by e.g. booting a live distro and mount the partition.

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: Need help after changing shell

Post by MartinR » 2019/03/18 15:59:02

If you can log in as any user you should be able to su into root using bash:

Code: Select all

$ su -s /bin/sh
Password:
sh-4.2# echo $SHELL
/bin/sh
sh-4.2#
You ought to be able to run vipw and fix the problem.

As a check I also tried the same thing getting into Korn (/bin/ksh). The prompt was a plain hash, and the output from the echo was /bin/ksh, so exactly as documented and expected.

--BTW, Remember to log out of su sessions ASAP, they are dangerous to leave running as I'm sure you remember!

Post Reply