change_pg_password.sh 脚本允许 root 用户在 Data Mover 服务器上更改 POSTGRES、DATAMOVER、BAR 和 CS2 密码。
Data Mover 中捆绑的 DSA 的密码通过 change_pg_password.sh 脚本来更新,请勿使用 DSA 提供的脚本。
使用该脚本为 DATAMOVER 指定的新密码将应用于用户 BAR。启动时,该脚本登录到内部 POSTGRES 存储库并更改存储库密码。该脚本是 tdm-linux 包的一部分,其位置由该包在服务器上所在的位置决定。例如:
/var/opt/teradata/packages/DataMover/17.12.00.00/change_pg_password.sh
如果您以前曾使用 daemon.properties 文件中的 dm.job.production.password 更改 DATAMOVER 密码,请在运行 changepassword.sh 脚本之前将该属性从 daemon.properties 中移除。
Teradata 建议您在安装或升级 Data Mover 之前运行脚本。如果在安装或升级 Data Mover 后运行脚本,则需要重新启动守护程序以确保 Data Mover 能够正常运行。
密码中不允许使用以下特殊字符:
- 单引号 ( ' )
- 双引号 ( " )
- 空格
- 执行以下操作之一:
脚本选项 说明 交互式 - 不使用参数运行脚本︰
change_pg_password.sh
- 出现提示时,输入旧密码和新密码。
非交互式 - 使用参数 -o、-p、-m 和 -d 运行脚本。例如:
# change_pg_password.sh -o Current password for user 'postgres' -p New password for user 'postgres' -m Current password for user 'datamover', 'bar', & 'cs2' -d New password for user 'datamover', 'bar', & 'cs2',其中:
- Current password for user 'postgres' 是 POSTGRES 用户的现有密码
- New password for user 'postgres' 是 POSTGRES 用户的新密码
- Current password for user 'datamover', 'bar', & 'cs2' 是 DATAMOVER、BAR 与 CS2 用户的现有密码
- New password for user 'datamover', 'bar', & 'cs2' 是 DATAMOVER、BAR 与 CS2 用户的新密码
- 不使用参数运行脚本︰
- 如果您在安装或升级 Data Mover 后运行 change_pg_password.sh 脚本,请重新启动守护程序:
- # /etc/init.d/dmdaemon stop
- # /etc/init.d/dmdaemon start
- # /etc/init.d/dmcs2 stop
- # /etc/init.d/dmcs2 start
- 使用以下命令验证 Data Mover 组件是否可供使用:
- datamove list_jobs
- datamove list_agents
脚本示例
location:/var/opt/teradata/packages/DataMover/17.12.00.00 # sh change_pg_password.sh Do you want to change password for user 'postgres' of the Postgres internal repository?(yes/no/y/n)? y ---------------------------------------------------------------- Change Postgres Password Use double quotes when entering passwords containing special characters ---------------------------------------------------------------- Old Password: Retype Old Password: New Password: Retype New Password: Do you want to change password for user 'DATAMOVER', 'BAR', and "CS2" of the Postgres internal repository?(yes/no/y/n)? y ---------------------------------------------------------------------- Change DATAMOVER, BAR, and CS2 Password Use double quotes when entering passwords containing special characters ---------------------------------------------------------------------- Old Password: Retype Old Password: New Password: Retype New Password: ********************************************************************************************** Postgres Password changed successfully ********************************************************************************************** ********************************************************************************************** DATAMOVER, BAR, and CS2 Password changed successfully ********************************************************************************************** DATAMOVER and BAR: Please restart the Daemon using the following commands /etc/init.d/dmdaemon stop /etc/init.d/dmdaemon start ********************************************************************************************** CS2: Please restart the Daemon using the following commands /etc/init.d/dmcs2 stop /etc/init.d/dmcs2 start ********************************************************************************************** Please wait .. updating DSA properties files ********************************************************************************************** DSA properties files updated successfully ********************************************************************************************** The DSC and DSARest web service have been restarted **********************************************************************************************