博客
关于我
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 3:何时使用 dict,何时使用元组列表?
查看>>
Python 3d 绘图 - 轴居中
查看>>
python ==》 字典
查看>>
python anaconda 安装使用
查看>>
python and或or 当参数传递的时候的用法
查看>>
Python append() 与列表上的 + 运算符,为什么这些会给出不同的结果?
查看>>
Python APP自动化测试工具adb与Monkey使用详解
查看>>
Python APP自动化测试框架Appium详解
查看>>
Python APP自动化测试框架开发实战
查看>>
python argparse模块
查看>>
Python asyncio库的学习和使用
查看>>
Python AttributeError:“dict“对象没有属性“append“
查看>>
Python base64和hashlib模块
查看>>
python basic programs
查看>>
python bert_gen.py 报错Unable to load weights from pytorch checkpoint file for......
查看>>
python binascii.Error: Incorrect padding
查看>>
Python bool() 函数能否为无效参数引发异常?
查看>>
Python C 程序子进程在“for line in iter“处挂起
查看>>
Python Celery:自动化测试平台定时任务必备的三方库
查看>>
python check_output 失败,退出状态为 1,但 Popen 适用于相同的命令
查看>>