Skip to content
September 11, 2026
  • Bluesky
  • Facebook
  • Linkedin
  • Mastodon
  • RSS
  • Twitter
  • Youtube

Daily CyberSecurity

Zero-hour alerts. Unmatched analysis.

Primary Menu
  • Home
  • CVE Data
    • CVE Watchtower
    • Top Exploited CVEs
    • CVE Stats by Vendor
    • Q2 2026 Report
    • CVE Alerts
    • CVE Alert Settings
    • Pricing
  • Cyber Criminals
  • Data Leak
  • Linux
  • Malware
  • Vulnerability
  • Submit Press Release
  • Weekly Recap
Light/Dark Button
  • Home
  • Technique
  • Installing Postgresql on Debian/Ubuntu
  • Technique

Installing Postgresql on Debian/Ubuntu

Do Son 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
Share on FacebookShare on XShare on LinkedInShare on TelegramShare on BlueskyShare on Mastodon
Tags: Installing Postgresql

Search

Translation

CVE ALERTS
📧

Email Delivery
Get threat intel straight to your inbox.

♾️

Unlimited Vendors
Track every technology in your stack.

🚨

All New CVE Alerts
Be the first to know about new flaws.

⚙️

Custom EPSS Threshold
Filter noise, focus on real risks.

💬

Slack & Teams Webhook
Integrate directly into your SecOps.

🚫

100% Ad-Free
Enjoy an uninterrupted reading experience.

$7/mo
Subscribe Now

🚨 Active Exploits in the Wild

  • CVE-2026-42016CVSS 8.1
    JFrog Artifactory (Self Hosted) versions before 7.133.11 are vulnerable to a privilege escalation attack due to a validation...
    Admin intel📅 Updated: Sep 11, 2026
  • CVE-2026-42018CVSS 7.5
    JFrog Artifactory could return an internal anonymous-user token to an unauthenticated caller when anonymous access is disabled, potentially...
    Admin intel📅 Updated: Sep 11, 2026
  • CVE-2026-20079CVSS 10.0
    A vulnerability in the web interface of Cisco Secure Firewall Management Center (FMC) Software could allow an unauthenticated,...
    Admin intelCISA KEV📅 Added to KEV: Sep 9, 2026📅 Updated: Sep 9, 2026
  • CVE-2025-25249CVSS 8.1
    A heap-based buffer overflow vulnerability in Fortinet FortiOS 7.6.0 through 7.6.3, FortiOS 7.4.0 through 7.4.8, FortiOS 7.2.0 through...
    Admin intelCISA KEV📅 Added to KEV: Sep 9, 2026📅 Updated: Sep 9, 2026
  • CVE-2026-87491
    Out of bounds write in V8 in Google Chrome prior to 153.0.8010.36 allowed a remote attacker to execute...
    Admin intelCISA KEV📅 Added to KEV: Sep 9, 2026📅 Updated: Sep 9, 2026
  • CVE-2026-19490
    Vulnerability in NetScaler ADC and NetScaler Gateway. This issue affects ADC: from 14.1 through 73.32 and from 13.1...
    CISA KEV📅 Added to KEV: Sep 9, 2026
  • CVE-2026-75650CVSS 10.0
    Adobe Commerce is affected by an Improper Neutralization of Special Elements Used in a Template Engine vulnerability that...
    Admin intelCISA KEV📅 Added to KEV: Sep 8, 2026📅 Updated: Sep 8, 2026
  • CVE-2026-81963CVSS 7.8
    Improper link resolution before file access ('link following') in Windows Update Stack allows an authorized attacker to elevate...
    CISA KEV📅 Added to KEV: Sep 8, 2026
Powered by CVE Watchtower

🔴 Live Critical Threats

  • CVE-2026-82107CVSS 9.6
    IBM DataStage on Cloud Pak for Data 5.4.0.0 could allow a remote...
  • CVE-2026-82100CVSS 9.6
    IBM DataStage on Cloud Pak for Data 5.4.0.0 could allow a remote...
  • CVE-2026-81204CVSS 9.8
    IBM Langflow OSS 1.0.0 through 1.11.5 could allow a remote attacker to...
  • CVE-2026-80424CVSS 9.1
    IBM DataStage on Cloud Pak for Data 5.4.0.0 could allow a remote...
  • CVE-2026-79724CVSS 9.8
    IBM Langflow OSS 1.0.0 through 1.11.5 could allow a remote attacker to...
  • CVE-2026-78573CVSS 9.8
    IBM ContextForge MCP Gateway 1.0.0 through 1.0.7 could allow a remote attacker...
  • CVE-2026-45764CVSS 9.1
    Suricata is a network Intrusion Detection System, Intrusion Prevention System and Network...
  • CVE-2026-19646CVSS 9.1
    IBM Common Licensing Agent 9.0, Agent 9.0.0.1, Agent 9.0.0.2, ART 9.0, ART...
  • CVE-2026-89094CVSS 9.9
    Forgejo before 16.0.4 allows remote code execution via a crafted template repository...
  • CVE-2026-85025CVSS 9.8
    IBM Langflow OSS 1.0.0 through 1.11.5 Langflow could allow an unauthenticated attacker...
Powered by CVE WATCHTOWER

Our Websites
  • Penetration Testing Tools
  • The Daily Information Technology
  • Top Exploited CVEs
  • Daily CyberSecurity

    • About SecurityOnline.info
    • Advertise with us
    • Announcement
    • Contact
    • Contributor Register
    • Login
    • Disclaimer
    • DCMA
    • Privacy Policy
    • 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

    • CVE Watchtower
    • CVE Statistics by Vendor 2026
    • Q2 2026 Report
    • Top Exploited CVEs
    • Bluesky
    • Facebook
    • Linkedin
    • Mastodon
    • RSS
    • Twitter
    • Youtube
    © 2017 - 2026 Daily CyberSecurity. All Rights Reserved.