Login incorrect error after changing shell

I've installed FreeBSD 9 in a VM. I have one user account aside from root. I installed the zsh package and then set root's and my shell using chsh to /usr/local/bin/zsh, which was a valid entry in /etc/shells. After rebooting, I cannot log in. I know what the passwords are, and they are not incorrect. I used the recommended partition scheme including a boot, root, and swap partition; /usr is not separate or unmounted.

I have also tried booting into single user mode, running /bin/sh, mounting the filesystem, and resetting the password, but this did not work either.
 
Can you boot into single user mode and reset the passwords?
 
mharvey87 said:
Can you boot into single user mode and reset the passwords?
Yes. When I run whoami, the result is 0. passwd root results in
Code:
no such user

I also tried editing master.password. I erased the password hash for root and reset the shell to /bin/sh. When I try to log in as root, it still prompts for a password, I hit enter, and I still get the login incorrect message.
 
Use vipw(8) for editing /etc/master.passwd, FreeBSD uses external db(3) style databases for user account files that need to created from the master file using proper utilities. The default shell for root is /bin/csh, don't change that to anything else.
 
kpa said:
Use vipw(8) for editing /etc/master.passwd, FreeBSD uses external db(3) style databases for user account files that need to created from the master file using proper utilities. The default shell for root is /bin/csh, don't change that to anything else.

After again booting into single-user mode and running vipw, I see that my changes made to the file using regular vi had stuck. I edited root's shell to csh, and rebooted. After this I was able to log in as root and reset the password.

However, I still don't understand why my regular user cannot log in with zsh.
 
First of all, you shouldn't change your original post so much after you get responses to it. It makes the rest of the thread appear out of order, making less sense to anyone reading it, and therefore of less help to future people having the same problem.

After entering your username and password what is the exact wording of the error message you're getting? Is it just
Code:
Login incorrect
and then goes back to
Code:
login:
on the next line?
 
Yes. It seems that the issue was how I used chsh. The first time, I ran it with no arguments, which spawned an editor where I entered the chagne manually (which led to the error). After resetting my shell to /bin/csh, I was able to log in. Then I ran $ chsh -s /usr/local/bin/zsh, and that worked.

In response to my inclusion of additional information in the OP, I wanted anyone who finds this thread (whether member or not) to be able to get a quick overview of the whole issue in the first post, as opposed to reading the entire thread, since sometimes threads can get quite lengthy. If your suggestion is an enforceable community guideline, I will be happy to follow it.
 
Back
Top