Can UID and GID be the same?
Answer
So, the short answer: no, UID is not always equal to GID. Still, /etc/passwd contains both the UID and GID of the default group on the same line so it’s rather easy to extract them.
Photo in the article by “Wikimedia Commons”
How to Change sudo Password in Ubuntu
To set the default password:
Answer
So, the short answer: no, UID is not always equal to GID. Still, /etc/passwd contains both the UID and GID of the default group on the same line so it’s rather easy to extract them.
Photo in the article by “Wikimedia Commons”
Code:
https://commons.wikimedia.org/wiki/File:Icosahedron_with_colored_vertices,_2-fold.png
- Step 1: Open the Ubuntu command line. We need to use the Ubuntu command line, the Terminal, in order to change the sudo password.
- Step 2: Log in as root user. Only a root user can change his/her own password.
- Step 3: Change the sudo password through the passwd command.
- Step 4: Exit the root login and then the Terminal.
To set the default password:
- Run the psql command from the postgres user account: sudo -u postgres psql postgres.
- Set the password: \password postgres.
- Enter a password.
- Close psql. \q.