[Solved] login_getclass: unknown class ‘default’ after freebsd-update

If you are experiencing the following error after updating FreeBSD:

login_getclass: unknown class 'default'
login_getclass: no default/fallback class 'default'
pam_acct_mgmt: error in service module

Restart your system, login as root and run the following commands:

cp /usr/src/etc/login.conf /etc
cap_mkdb /etc/login.conf 
reboot

After reboot the system again and it should be working.