Mystic's picture

Should be a rather simple question, but I don't know what is the username/password credentials for both the Webmin and also the Postgres database (via shell).

I want to run some queries in Postgres, and I would like to have access to both methods (graphical Webmin interface and also shell access to the Postgres database as well).

Jeremy Davis's picture

Webmin uses the 'root' (or 'admin' on AWS Marketplace servers) Linux user account credentials.

PostgreSQL uses an authentication (Linux) socket, so via commandline no password is required. You just need to be logged in via 'root' (or prefix 'sudo' on AWSMP). You can then just 'su' as the 'postgres' user to run Postgres commands. E.g. to interactively use the PosgreSQL shell:

su - postgres -c psql

(for AWSMP, prefix with sudo)

If you want to use some other interface which does require a password, then you should have set the password when you first set up the server. If you don't recall what it was, then you can interactively reset it like by running the below script (on AWSMP prefix with 'sudo'):

Mystic's picture

Thanks for your response Jeremy. I login to my AWS via an SSH key...but how do I get the actual password of the admin account to login to the Webmin?

Jeremy Davis's picture

But you can reset it like this:

/usr/lib/inithooks/bin/ USERNAME

(prefix sudo when AWSMP)

So in your case, to reset the admin Linux user account when running on AWSMP:

sudo /usr/lib/inithooks/bin/ admin

Be sure to set a good one though won't you!?!

Add new comment