You are not logged in.

#1 2019-01-09 15:04:24

omid3098
Member
Registered: 2019-01-09
Posts: 4

Incorrect password after removing fish and installing zsh

Hi,
this is what I've done before the problem happens:
removed fish
installed zsh and oh-my-zsh
tried to change shell to zsh using

chsh -s $(which zsh)

which failed to do because of permission error.
reboot and failed to login into my user.but root was working fine.
logged in as root and removed zsh and oh-my-zsh
now both user and root fail to login.

using xfce login I see: "Incorrect password, please try again" for both user and root
after pressing alt+ctrl+f2 it loges: Login incorrect.
I have checked both methods listed here Reset lost root password with no luck


any kinds of help is highly appreciated.

Offline

#2 2019-01-09 15:11:12

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: Incorrect password after removing fish and installing zsh

Please tell me you did not uninstall bash

From install media, mount your root file system at /mnt and look at the file /mnt/etc/passwd
Ensure the line for root reads like:

root:x:0:0:root:/root:/bin/bash

Do what you will for your users, but I really suggest you leave the shell for root alone and always use bash


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2019-01-09 15:48:15

omid3098
Member
Registered: 2019-01-09
Posts: 4

Re: Incorrect password after removing fish and installing zsh

ewaller wrote:

Please tell me you did not uninstall bash

From install media, mount your root file system at /mnt and look at the file /mnt/etc/passwd
Ensure the line for root reads like:

root:x:0:0:root:/root:/bin/bash

No I did not uninstalled bash.
/mnt/etc/passwd looks like this

root:x:0:0:root:/root:/bin/zsh

changing that end zsh to bash made me able to login into root user again. but still can`t login into my user. is there any similar places containing my user shell information?

Do what you will for your users, but I really suggest you leave the shell for root alone and always use bash

how can I make sure that root will not be affected by other shells?

Offline

#4 2019-01-09 15:53:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,314

Re: Incorrect password after removing fish and installing zsh

Don't run chsh as root/sudo and your user should have a similar entry in /mnt/etc/passwd (resp. /etc/passwd when you're on the installed system)
Also pay some attention to errors, "tried to change shell to zsh using chsh -s $(which zsh) which failed to do because of permission error. reboot and failed to login" is actually not much of a surprise.
You can also install zsh and fish and whatnot - having multiple shells and multiple kernels (linux + linux-lts) installed is a great way to stay out of trouble…

Offline

#5 2019-01-09 17:21:56

omid3098
Member
Registered: 2019-01-09
Posts: 4

Re: Incorrect password after removing fish and installing zsh

Thanks for information.I will keep them in mind.
There is a line in /etc/passwd like this:

omid:x:1000:1000::/home/omid:/usr/bin/fish

changing fish to bash did not made me login into my user.

also changed password using

passwd omid

but same incorrect password will be shown.

am I allowed to use /bin/bash instead of /usr/bin/bash ? or this will make my user role as root?

Offline

#6 2019-01-09 18:09:45

omid3098
Member
Registered: 2019-01-09
Posts: 4

Re: Incorrect password after removing fish and installing zsh

Changed /user/bin/bash to /bin/bash and now I am able to login into my user.
Is this safe? what is the difference of having bash in these two places?
and if this method is safe I can mark this thread as solved.

Offline

#7 2019-01-09 18:22:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Incorrect password after removing fish and installing zsh


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2019-01-09 18:26:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: Incorrect password after removing fish and installing zsh

I might add that I constrained my advice to root for a reason.  In general, one should use the right tools for the job as outlined in the linked articles.  But, in your case, things were broken to the extent that the easiest solution was to hand edit the file.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB