Everything was working fine until this morning. The postgresql service has stopped and I can't start it.
When I run the command sudo service postgresql start
, I get a [FAILED] message. Then, I go to the /var/lib/pgsql/pgstartup.log file, and I see the following error message:
runuser: /bin/bash:/sbin/nologin: No such file or directory
Then I tried to su to root, which I have been able to do in the past, but I get the same error message. Then I tried to su to the user postgres, and I get the same error message.
The files do exist, I checked them both (/bin/bash and /sbin/nologin).
NOTE - I was able to resolve the error by typing the following command - sudo chsh root -s $SHELL
. This actually allowed me to start the postgresql server after su'ing to root. I guess my question now is - Does anyone know what would cause this situation? Should I be concerned that my system is compromised security-wise?
/bin/bash:/sbin/nologin