The stackexchange link says "it is not possible to login to the account using a password", but the baeldung link says "anyone can log in to the account without any password".
Both "!" and "!!" being present in the password field mean it is notpossible to login to the account using a password.
As it can be read from the documentation of RHEL-4, the "!!" in theshadow-password field means the account of a user has been created,but not yet given a password. The documentation states (possiblyerroneously) that until being given an initial password by a sysadmin,it is locked by default.
!! in /etc/shadow’s Password Field
Another symbol that we may encounter in the password field of the /etc/shadow file is the two exclamation points. !! indicates thatsomeone has created a user account but has not given it a password.Therefore, anyone can log in to the account without any password,which is a serious risk.
Which is correct for Ubuntu system?