where $USERNAME is the username you setup? Let’s use “fred” as an example :
passwd fred
And it returns :
passwd: user 'fred' does not exist
Sounds like you maybe didn’t mount/remount the root filesystem properly perhaps :
mount -rw -o remount / please try the above mount operation again and NOTE very carefully any error messages.
Before typing “passwd” again - maybe verify that $USERNAME exists in the password database /etc/passwd, you can “cat /etc/passwd”, or “less /etc/passwd”, or “grep $USERNAME /etc/passwd”.
If you’re 100% sure you created that username, that it exists, then if you’re doing EVERYTHING right the way that page suggests, and your $USERNAME does NOT have an entry in /etc/passwd, then
you’re still doing something wrong (e.g. mounting your root “/” filesystem) - or
you misspelled the username - or
the username actually doesn’t exist
Note : per @joseph response, I do not think there would a drastic change between 20.04 and 21.04, I can’t imagine Linux or any distribution will abandon the ancient, but reliable, /etc/passwd, /etc/shadow, /etc/group user accounting system anytime soon…
e.g. passwd: user 'fred' does not exist
gives the same result on 20.04 and 21.04, because on NEITHER of those systems, is there a “fred” in my /etc/passwd file…