# No root and user login after upgrdae to 13.0



## schwedenmann (Dec 22, 2021)

Hallo
After upgrading from 11.2 to 13,I am unable to login as root either than as user.  I tried this:
https://forums.freebsd.org/threads/root-can-not-login-after-update-and-reboot.11607/ but this brings me no way further. I bootet in 
single-user mode 


> Boot to single user mode. Then:
> 
> 
> Code:
> ...


but I don't know what to do next, to get root-login oder user-login back.

schwedenmann

Now change root's shell back to /bin/tcsh with the # chsh command.


----------



## SirDice (Dec 22, 2021)

Upgrade all your installed packages/ports too.


----------



## covacat (Dec 22, 2021)

vipw, check the file looks ok modify back and forth a comment line and save
that will rebuild *pwd.db files
(which may have been fscked during etcupdate merge)


----------



## schwedenmann (Dec 22, 2021)

Hallo



> Upgrade all your installed packages/ports too.


But it seems,that in single-user mode, I have no Inet, so pkg upgrade fails



> vipw, check the file looks ok modify back and forth a comment line and save
> that will rebuild *pwd.db files
> (which may have been fscked during etcupdate merge)


Sorry, what does this mean, I am using Freebsd only as a linuxuser for my backupserver with zfs-mirror ,rsync and nfsv4,but i am not so experienced in FreeBSD,sorry. Also my prfered editor is mcedit,which is at this moment unavailable.

Also I must mentieoned,that I have user zsh as default sh in the Konfiguration.

thanks
schwedenmann


----------



## SirDice (Dec 22, 2021)

schwedenmann said:


> But it seems,that in single-user mode, I have no Inet, so pkg upgrade fails


Exit so single user mode ends. Login as root (which should now work again). Then run the upgrades of your ports/packages.


----------



## schwedenmann (Dec 22, 2021)

Hallo

I am doing in singluser-mode
1. fsck -y
2. mount -a /
3. mount -a -t ufs
4.swapon -a

when I then tipe exit, oder tcsh then single-mode exist after a few moments und login: appeares,but no login is possible.



> Exit so single user mode ends. Login as root (which should now work again). Then run the upgrades of your ports/packages.


No this don't work, I can no login as root, or as normal user,after existing singl-user mode. It seems that zsh is then required but not available "libncursesw.so.8 not found,required by zsh"

zsh is defined as default shell for me.


schwedenmann


----------



## SirDice (Dec 22, 2021)

schwedenmann said:


> I can no login as root, or as normal user,after existing singl-user mode. It seems that zsh is then required but not available "libncursesw.so.8 not found,required by zsh"


You changed root's shell to csh(1) in post #1. So you should be able to login again as root. The zsh(1) will be fixed once you reinstalled all your ports/packages.


----------



## schwedenmann (Dec 22, 2021)

Hallo

I do this

1. single-user mode
2. I tipe /bin/csh
3. fsck -y
4. mount -u /
5. mount -a -t ufs
6. swapon -a

when I then do pkg upgrade
I got this
http://pkg... Non-recoverable resolver failure

schwedenmann

P.S
No package Database installed
and with portsbap fetch: looking up potzsnap.FreeBSD.org mirrors .. none found


----------



## SirDice (Dec 22, 2021)

schwedenmann said:


> 1. single-user mode
> 2. I tipe /bin/csh
> 3. fsck -y
> 4. mount -u /
> ...


7. Run chsh(1) to change root's shell back to /bin/csh. 
8. Then `exit`. You should be able to use root again after this.


----------



## schwedenmann (Dec 22, 2021)

Hallo

Sorry

for change to csh , how do I do it

chsh -s /usr/local/bin/csh root and also /usr/local/sbin/csh root doesn' work
"/usr/local/bibn/csh doen't exist 
pwd_mkdb_ warning unknown root shell

So how to change to csh to get login back ?

schwedenmann


----------



## SirDice (Dec 22, 2021)

It's /bin/csh.


----------



## schwedenmann (Dec 22, 2021)

Hallo

Yes works now, zpool mirror is also up,so everything works fine
thanks very much for your patience 

sorry for wasting your time

schwedenmann


----------

