I wonder why when I provide root's password, the following command reports failure?
$ su postgres Password: su: Authentication failure
Is it correct that
su
asks for the password of root, not ofpostgres
?If it is the password of
postgres
, when I installed postgreSQL, I didn't set up a login name to connect to postgresql server, and I didn't explicitly create the userpostgres
on my Ubuntu, so what is its password?in
/etc/passwd
postgres:x:124:133:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
in
/etc/shadow
:postgres:*:17478:0:99999:7:::
If I indeed can't
su postgres
, then generally speaking, what target users cansu
switch to?Is it correct that they are also the users whose ids setuid() can take as argument?
From APUE, I learned that login names without valid login shell command can't be used for login. Are they also can be
su
ed to? Butpostgres
has a valid login shell command/bin/bash
, so why can't Isu postgres
?
Thanks.