# Merge old passwd and group files after a broken upgrade



## Hanky-panky (Mar 31, 2015)

Hello,

I had problem upgrading from 10.0-RELEASE to 10.1-RELEASE.

Just a sidenote: freebsd-update(8) is still broken and it fails with the know problems.

So, to fix the system, I had to untar the base.txz file from the installer and - to have consistent system - I rebuilt with complete success world and kernel.

Now, I face a problem: my old /etc/passwd and /etc/group files are not recognized. Even if I restore the old copy of both of them, they are still not recognized and the system just act like if they are not in place.

What can I do to merge this two old files and have the new perfectly working system recognize them without have to manually recreate (add) the old users and groups?


----------



## SirDice (Mar 31, 2015)

Keep in mind that passwords are not stored in /etc/passwd, they're stored in /etc/master.passwd (/etc/passwd can be generated from it with pwd_mkdb(8)). Which files did you use to try to restore the user database?


----------



## Hanky-panky (Mar 31, 2015)

/etc/passwd and /etc/group.

Which backup files should restore to have my users and groups back?


----------



## SirDice (Mar 31, 2015)

The /etc/passwd file only contains user accounts and is really only used for backwards compatibility. You need to look for master.passwd. That file contains the users and passwords, from there /etc/passwd, /etc/spwd.db and /etc/pwd.db are generated. It's /etc/spwd.db that's actually used to authenticate users.


----------



## Hanky-panky (Mar 31, 2015)

SirDice said:


> The /etc/passwd file only contains user accounts and is really only used for backwards compatibility. You need to look for master.passwd. That file contains the users and passwords, from there /etc/passwd, /etc/spwd.db and /etc/pwd.db are generated. It's /etc/spwd.db that's actually used to authenticate users.


Thank you just copy this files back from the backup in single user mode perfectly fixed everything.

Now just a complain: how and I say HOW developers after 4 months from the release could allow a broken binary freebsd-update on them server without any single warning?

This is completely unprofessional from a leading and stabilished server OS.

PS: now I do have to rescue four more machines becouse no one was able to finish binary upgrade with any error.


----------



## kpa (Mar 31, 2015)

Hanky-panky said:


> Thank you just copy this files back from the backup in single user mode perfectly fixed everything.
> 
> Now just a complain: how and I say HOW developers after 4 months from the release could allow a broken binary freebsd-update on them server without any single warning?
> 
> ...



I gave up on freebsd-update(8) a long ago and I now use source based updates/upgrades only. You're not the only one who has been bitten by the mentioned piece of shi software.


----------

