You are not logged in.
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
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/bashDo 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
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/zshchanging 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
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
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/fishchanging fish to bash did not made me login into my user.
also changed password using
passwd omidbut 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
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
Read the warning: https://wiki.archlinux.org/index.php/Us … management
Offline
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