AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题

问题[password](dba)

Martin Hope
showkey
Asked: 2022-10-03 14:21:10 +0800 CST

如何在 PostgreSQL 中获取用户的密码?

  • 6

我以超级用户身份登录我的数据库postgres。

postgres=# SELECT *  FROM pg_user;
+----------+----------+-------------+----------+---------+--------------+----------+----------+-----------+
| usename  | usesysid | usecreatedb | usesuper | userepl | usebypassrls |  passwd  | valuntil | useconfig |
+----------+----------+-------------+----------+---------+--------------+----------+----------+-----------+
| postgres |       10 | t           | t        | t       | t            | ******** | (null;)  | (null;)   |
| test     |    24763 | f           | f        | f       | f            | ******** | (null;)  | (null;)   |
+----------+----------+-------------+----------+---------+--------------+----------+----------+-----------+
(2 rows)

我已经列出了数据库中的所有用户。如何获取普通用户的密码test?

postgresql password
  • 1 个回答
  • 857 Views
Martin Hope
showkey
Asked: 2021-12-02 05:37:59 +0800 CST

为什么无法重置 postgres 的密码?

  • 0

我可以在没有密码的情况下登录 postgresql 数据库:

sudo -u postgres psql

现在我想为 postgres 重置密码“xxxxxxxx”:

sudo -u postgres psql
postgres=# ALTER USER postgres WITH PASSWORD 'xxxxxxxx';
ALTER ROLE
postgres=# \q
sudo passwd -d postgres
passwd: password expiry information changed.
sudo -u postgres passwd
New password: 
Retype new password: 
passwd: password updated successfully

现在重新启动 postgresql:

sudo systemctl restart postgresql

issu1:无法使用以下命令登录 postgres xxxxxxxx:

psql -d postgres  -U postgres  -W
Password: 
psql: error: FATAL:  Peer authentication failed for user "postgres"

issu2: 为什么不用密码的用户 postgres 仍然可以登录 postgres?

sudo -u postgres psql
postgresql password
  • 1 个回答
  • 243 Views
Martin Hope
Glorfindel
Asked: 2021-09-02 03:53:58 +0800 CST

如何在不重置的情况下更改 pgAdmin 4 的主密码?

  • 4

pgAdmin 4有一个主密码

需要保护并稍后解锁保存的服务器密码。这仅适用于桌面模式用户。

在此处输入图像描述

我知道我当前的主密码,但是,我想更改它而不重置它,因为

重置主密码还将删除所有已保存的密码并关闭所有现有的已建立连接。

这可能吗?

pgadmin-4 password
  • 1 个回答
  • 6700 Views
Martin Hope
bakalolo
Asked: 2021-02-02 13:21:41 +0800 CST

将服务器密码存储在表中以使用 CURSOR 读取

  • 0

我想使用 Linked Server 连接到多个服务器做下载表并做查询。我想将服务器 IP 存储在一个表中,并使用 CURSOR 连接到每个列表。我也想将密码存储在桌子上,但我不知道这是否是个坏主意。这可以吗?或者有什么更好的选择?

是否有不需要密码的 sp_addlinkedsrvlogin 版本..?

t-sql password
  • 1 个回答
  • 40 Views
Martin Hope
r0tt
Asked: 2020-09-09 04:52:29 +0800 CST

在 Oracle 数据库中更改 sys 的密码需要什么权限?

  • 0

我们的身份管理工具希望定期更改 sys 密码。它因 ORA-01031 而失败。我需要授予身份管理工具用户哪些权限或角色才能更改 sys 密码?

oracle password
  • 4 个回答
  • 2370 Views
Martin Hope
toydarian
Asked: 2020-08-29 06:02:24 +0800 CST

使用ansible全新安装mariadb后无法设置root密码

  • 2

问题:
全新安装 mariadb 10.4 后,无法使用 ansible 设置 root 密码。
当通过 mariadb(不是官方的 debian 包)从 debian 包安装 mariadb 时,密码root为空,可以从 localhost 进行无密码登录。

尽管如此,ansible还是mysql_user抛出了以下错误:
failed: [XXX] (item=localhost) => {"ansible_loop_var": "item", "changed": false, "item": "localhost", "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1698, \"Access denied for user 'root'@'localhost'\")"}

mariadb password
  • 1 个回答
  • 2120 Views
Martin Hope
alvarez
Asked: 2020-08-26 05:59:31 +0800 CST

我为 Oracle Apex 实例管理员帐户提供的管理员密码有什么问题?

  • 1

我已经在 Oracle Linux 7.8 上安装了 Oracle Database 19c 企业版。我现在正在尝试安装Apex 20.1。

进入“5.4.2.3 运行apxchpwd.sql”章节设置实例管理员密码。执行@apxchpwd.sql命令,它询问我用户名、电子邮件和密码,但随后它给出了一个错误,好像密码没有足够的复杂性,尽管我提供的密码是字面意思H29dN8%Ih^^IV$Y3$j4Mx。尝试了各种其他密码,似乎没有什么可以接受的。

可能是什么问题?

这是我遇到错误的方法:

[oracle@oraclemachine apex]$ sqlplus /nolog

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 25 09:50:03 2020
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

SQL> connect sys as sysdba
Enter password:
Connected.
SQL>
SQL> @apxchpwd.sql
...set_appun.sql
================================================================================
This script can be used to change the password of an Application Express
instance administrator. If the user does not yet exist, a user record will be
created.
================================================================================
Enter the administrator's username [ADMIN] apexadmin
User "apexadmin" does not yet exist and will be created.
Enter apexadmin's email [apexadmin] [email protected]
Enter apexadmin's password []
--------------------------------------------------------------------------------
PASSWORD_COMPLEXITY_ERROR
* PASSWORD_ONE_ALPHA_ERR
* PASSWORD_ONE_PUNCTUATION_ERR
* PASSWORD_ONE_UPPER_ERR
* PASSWORD_ONE_LOWER_ERR
--------------------------------------------------------------------------------
declare
*
ERROR at line 1:
ORA-20001: Password validation failed.
ORA-06512: at line 30
ORA-06512: at "APEX_200100.WWV_FLOW_FND_USER_INT", line 3744
ORA-06512: at line 20
oracle password
  • 1 个回答
  • 2305 Views
Martin Hope
J4ce
Asked: 2018-05-19 04:25:46 +0800 CST

为什么在 while 循环中随机生成的密码是一样的?数据库

  • 0

我有一个随机密码生成器。它本身工作正常。当我将它放在 while 循环中时,即使种子看起来不同,我也会得到相同的密码。

declare @count int = 0
declare @end int = 500

while (@count < @end)
    BEGIN
    DECLARE @r varchar(6)
    select @r = coalesce(@r, '') +char(
    case when r between 0 and 9 then 48
    when r between 10 and 35 then 55
    else 61 end + r)
    from master..spt_values
    cross join 
    (SELECT CAST(RAND(ABS(CHECKSUM(NEWID()))) *61 as int) r) a
    where type = 'P' and number < 6

    print(newId())
    print(@r)

    set @count = @count + 1
END

这会产生如下所示的输出: 如您所见,guid 每次都不同,但密码是相同的。 如何使每次迭代的密码都不同?在此处输入图像描述

t-sql password
  • 1 个回答
  • 83 Views
Martin Hope
Mark Jackson
Asked: 2016-06-17 07:32:30 +0800 CST

SA 密码不适用于 .\SQLAdmin

  • -1

有一些工作不工作的问题。为验证这是一个安全问题,将 SQL Agent 更改为在 DOMAIN\Administrator 下运行。回答了我关于安全问题的问题。

将代理帐户更改回 .\SQLAdmin。我使用与本地 sa 帐户相同的密码。不起作用。我认为 sa 和 .\SQLAdmin 是相关联的。

它们是同一个帐户还是 .\SQLAdmin 是本地计算机上完全独立的帐户?

sql-server-2008-r2 password
  • 1 个回答
  • 162 Views
Martin Hope
ufo
Asked: 2016-03-09 06:21:26 +0800 CST

MS SQL Server,在删除特定数据库之前询问密码

  • 4

我有 2 个数据库,它们对我们的组织非常重要。我想防止意外删除/删除它们......你有什么建议吗?我正在考虑在执行删除之前询问密码。这在 MS SQL Server 中可能吗?

sql-server password
  • 2 个回答
  • 396 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve