• About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
Skip to content
May 26, 2026
  • Linkedin
  • Twitter
  • Facebook
  • Youtube

Daily CyberSecurity

Zero-hour alerts. Unmatched analysis.

Primary Menu
  • Home
  • CVE Watchtower
  • Cyber Criminals
  • Data Leak
  • Linux
  • Malware
  • Vulnerability
  • Submit Press Release
  • Vulnerability Report
Light/Dark Button
  • Home
  • Technique
  • Installing Postgresql on Debian/Ubuntu
  • Technique

Installing Postgresql on Debian/Ubuntu

Ddos May 7, 2018 2 minutes read

PostgreSQL, often simply Postgres, is an object-relational database management system with an emphasis on extensibility and standards compliance.PostgreSQL is used by many applications. PostgreSQL is installed on Ubuntu/Debian with one command:

apt–get install postgresql

When installed, a postgres user with a local authentication of the Ident Authentication type is created.

We enter the database under the user postgres:

sudo –u postgres psql

Creating a Superuser with Password Authentication

Create a new user:
root – username;
MyPassword is the password.

 CREATE USER root WITH password ‘MyPassword’;

We give the rights of the superuser:

 ALTER USER root WITH SUPERUSER;

Exit from psql :

\q

Now you can connect to a user root with password authentication:
Since user root does not have its own database, we will connect to the postgres database :

 psql –h localhost –U root –d postgres –W

Parameters:
-h – server;
-U – username;
-d – database;
-W – use password authentication.

Creating a User and Database

Again, go into the management interface psql and create another user:
user – the username;

 CREATE USER user WITH password ‘MyPassword1’;

Create a database:
user_db – the name of the database;
MyPassword1 is the password.

CREATE DATABASE user_db;

give the user user rights to the user_db database :

 GRANT ALL ON DATABASE user_db TO user;

Exit from psql :

 \q

Now you can connect to the created database:

 psql -h localhost -U user -d user_db -W

Operations with tables

Create a users table with the login and password fields :

 CREATE TABLE users (login CHAR(64), password CHAR(64));

Delete table:

DROP TABLE users;

Useful commands in the psql interface :

Show users:

\du

Show databases:

\l

Show tables in the current database:

\dt

Show columns in the table:

 \d table_name

Show PostgreSQL version:

SELECT version();

Show the help of SQL statements:

\h

Show the help of psql commands:

 \?

Share this article:

Facebook Post LinkedIn Telegram

No related posts.

Tags: Installing Postgresql

Search

Translation

CVE WATCHTOWER
🚨

Receive alerts for vulnerabilities being exploited in the wild.

⚑

Get notified instantly when a Proof of Concept (PoC) exploit is published.

πŸ”

Access critical info on vulnerabilities even when marked as "RESERVED".

🧠

Insights powered by decades of expertise and global intelligence sources.

🎯

Customize alerts with up to 10 keywords for your specific tech stack.

πŸ“Š

Export the raw CVE database for SIEM integration and reporting.

Upgrade Package

πŸ”΄ Live Critical Threats

  • CVE-2026-42773CVSS 9.3
    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')...
  • CVE-2026-42774CVSS 9.3
    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')...
  • CVE-2026-9478CVSS 9.8
    A weakness has been identified in Totolink A8000RU 7.1cu.643_b20200521. Impacted is the...
  • CVE-2026-9477CVSS 9.8
    A security flaw has been discovered in Totolink A8000RU 7.1cu.643_b20200521. This issue...
  • CVE-2026-9476CVSS 9.8
    A vulnerability was identified in Totolink A8000RU 7.1cu.643_b20200521. This vulnerability affects the...
  • CVE-2026-9475CVSS 9.8
    A vulnerability was determined in Totolink A8000RU 7.1cu.643_b20200521. This affects the function...
  • CVE-2026-9458CVSS 9.8
    A vulnerability was identified in Totolink A8000RU 7.1cu.643_b20200521. The impacted element is...
  • CVE-2026-9457CVSS 9.8
    A vulnerability was determined in Totolink A8000RU 7.1cu.643_b20200521. The affected element is...
  • CVE-2026-9456CVSS 9.8
    A vulnerability was found in Totolink A8000RU 7.1cu.643_b20200521. Impacted is the function...
  • CVE-2026-9455CVSS 9.8
    A vulnerability has been found in Totolink A8000RU 7.1cu.643_b20200521. This issue affects...
Powered by CVE WATCHTOWER

Recent Zero-Day Vulnerabilities

  • Exploited in the Wild: Critical OWA Spoofing Flaw (CVE-2026-42897) Hits On-Premises Exchange Servers
  • Exploited in the Wild: Maximum CVSS 10 SD-WAN Flaw (CVE-2026-20182) Grants Admin Control
  • Exploited in the Wild: Critical 9.8 CVSS RCE Hits Canon GUARDIANWALL MailSuite
  • Exploit Code Released: Public PoC Dumps for Windows BitLocker Bypass and SYSTEM Elevation Zero-Days
  • Exploited in the Wild: “Dirty Frag” Linux Vulnerability Grants Instant Root Access
  • Under Active Attack: Ivanti EPMM Zero-Day Exploited in the Wild via Harvested Admin Credentials
Our Websites
  • Penetration Testing Tools
  • The Daily Information Technology
  • Daily CyberSecurity

    • About SecurityOnline.info
    • Advertise with us
    • Announcement
    • Contact
    • Contributor Register
    • Login
    • About SecurityOnline.info
    • Advertise on SecurityOnline.info
    • Contact Us

    When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works

    • Disclaimer
    • Privacy Policy
    • DMCA NOTICE
    • Linkedin
    • Twitter
    • Facebook
    • Youtube
    Copyright Daily CyberSecurity Β© All rights reserved.