I was having lot of trouble with my Ubuntu 16.04. After apt update/upgrade, my user ID was removed form /etc/passwd file (while being logged on) and I was not able to log on. I did not know root user password and I started recovery process. During recovery, I booted into root shel and realised missing user ID from passwd file. Home directory was present. I tried to add new user and got error missing policy dependancy. Fixed missing packages from recover menu and added user. When I log on as created user and try sudo I get error:
sudo: policy plugin failed session initialization
I can log on as root. How to find which plugin fails?