博客
关于我
VCSA5.x数据库密码更改
阅读量:597 次
发布时间:2019-03-12

本文共 1092 字,大约阅读时间需要 3 分钟。

背景

VCSA(vCenter Server Appliance)的数据库密码经常被长期忽视或仅定期修改。如果密码丢失或忘记,必需及时更改以恢复数据库访问权限。


操作指南

对于VCSA(vCenter Server Appliance)数据库密码更改,您需要遵循以下步骤:


1. 更改嵌入式数据库密码

方法一:通过SSH访问并编辑数据库配置文件

1.Using SSH连接到vCenter Server Appliance。2.Open the /etc/vmware-vpx/embedded_db.cfg 文件进行编辑。3.Finder数据库密码行(.search for EMB_DB_'PASSWORD'),更新单引号之间的密码值。

方法二:通过数据库配置文件更改密码

1.打开 /etc/vmware-vpx/vcdb.properties 文件进行编辑。2.更新数据库密码配置。


2. 更改vc和postgres数据库用户密码

方法一:通过SQL命令更改密码

1.Using SQL命令连接到vPostgres数据库:

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres

2.执行以下SQL命令,更改vc和postgres用户的密码:

ALTER USER postgres WITH PASSWORD 'new-password';ALTER USER vc WITH PASSWORD 'new-password';

3.退出数据库时,输入 \q 退出。

方法二:更新Postgres/.pgpass文件

1.编辑 /root/.pgpass 文件:

vi /root/.pgpass

2.在文件末尾添加以下条目:

  • localhost:5432:VCDB:postgres:new-password
  • localhost:5432:postgres:postgres:new-password
  • localhost:5432:VCDB:vc:new-password

3. 更改Postgres数据库密码

方法一:通过命令更改Postgres密码

1.更改vPostgres数据库密码:

passwd postgres

2.更新vpxd.cfg文件中的加密密码:

/usr/sbin/vpxd -p

3.重新启动vpxd服务:

/etc/init.d/vmware-vpxd restart

以上步骤仅适用于已知道数据库访问权限的情况。如果您忘记了数据库访问信息,建议先按照硬件访问流程重新获得管理员权限。

转载地址:http://pcwxz.baihongyu.com/

你可能感兴趣的文章
python | black,一个神奇的 代码格式化工具 Python 库!
查看>>
python | bleach,一个超强的 Python 库!
查看>>
python | cartopy,一个有趣的 Python 库!
查看>>
python | cloud-init,一个实用的 云计算 Python 库!
查看>>
python | code2flow,一个神奇的 Python 库!
查看>>
python | cudf,一个超实用的 Python 库!
查看>>
python | daphne,一个非常nice的 Python 库!
查看>>
python调用halcon
查看>>
python | doit,一个非常实用的 Python 库!
查看>>
python | easyocr,一个超厉害的 关于OCR的 Python 库!
查看>>
python | fastFM,一个高级的 Python 库!
查看>>
python | feature_engine,一个实用的 Python 库!
查看>>
python | filelock,一个超酷的 Python 库!
查看>>
python | fire,一个强大的 Python 库!
查看>>
python | flanker,一个神奇的 Python 库!
查看>>
python | flower,一个强大的 Python 库!
查看>>
python | funcy,一个超强的 提供函数式编程工具 Python 库!
查看>>
python | ggplot,一个超强的 Python 库!
查看>>
python | grab,一个强大的 Python 库!
查看>>
python | gunicorn,一个非常实用的 Python 库!
查看>>