eb43 Login incorrect error after changing shell - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

General General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

Reply
 
Thread Tools Display Modes
  #1  
Old May 30th, 2012, 01:46
dbbolton dbbolton is offline
Junior Member
 
Join Date: Jun 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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.

Last edited by DutchDaemon; May 30th, 2012 at 12:28. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #2  
Old May 30th, 2012, 01:48
mharvey87
Guest
 
Posts: n/a
Default

Can you boot into single user mode and reset the passwords?
Reply With Quote
  #3  
Old May 30th, 2012, 02:09
dbbolton dbbolton is offline
Junior Member
 
Join Date: Jun 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by mharvey87 View Post
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.

Last edited by DutchDaemon; May 30th, 2012 at 12:29. Reason: AGAIN: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #4  
Old May 30th, 2012, 02:59
kpa kpa is online now
Giant Locked
 
Join Date: Jul 2010
Location: People's Technocratic Republic of Finland
Posts: 2,015
Thanks: 44
Thanked 467 Times in 397 Posts
Default

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.
Reply With Quote
  #5  
Old May 30th, 2012, 03:09
dbbolton dbbolton is offline
Junior Member
 
Join Date: Jun 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by kpa View Post
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.

Last edited by DutchDaemon; May 30th, 2012 at 12:29.
Reply With Quote
  #6  
Old May 30th, 2012, 04:27
mharvey87
Guest
 
Posts: n/a
Default

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?

Last edited by DutchDaemon; May 30th, 2012 at 12:30.
Reply With Quote
  #7  
Old May 30th, 2012, 17:44
dbbolton dbbolton is offline
Junior Member
 
Join Date: Jun 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
Reply

Tags
error, login, shell

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Login incorrect Chris322P General 5 September 8th, 2011 05:51
Unable to authenticate action... when changing login properties carebearboy General 0 August 6th, 2011 06:49
How are people changing the look of the login screen? bigtoque GNOME 2 April 18th, 2011 15:54
[Solved] Changing Shell Manually - FreeBSD 7.2 anon_ind General 6 February 5th, 2010 05:49
[Solved] Shell path for root incorrect Aaron_VanAlstine General 12 July 11th, 2009 16:43


All times are GMT +1. The time now is 01:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0