Introduction
This article describe how to update MongoDB user password previously set as described here.
Implementation
Update user password
Using Mongo Shell, for each database listed into MongoDB authentication article, please launch following commands:
use <database>
db.auth("<user>","<old_password>")
db.changeUserPassword("<user>", "<new_password>")
Below is the complete list of commands
use Monitoring
db.changeUserPassword("<user>", "<new_password>")
use Profiles
db.changeUserPassword("<user>", "<new_password>")
use Resources
db.changeUserPassword("<user>", "<new_password>")
use training
db.changeUserPassword("<user>", "<new_password>")
use TRSL
db.changeUserPassword("<user>", "<new_password>")
use corpus
db.changeUserPassword("<user>", "<new_password>")
use development
db.changeUserPassword("<user>", "<new_password>")
use dictionary
db.changeUserPassword("<user>", "<new_password>")
use dispatcher
db.changeUserPassword("<user>", "<new_password>")
use environments
db.changeUserPassword("<user>", "<new_password>")
use feedbacks
db.changeUserPassword("<user>", "<new_password>")
use indexer
db.changeUserPassword("<user>", "<new_password>")
use locales
db.changeUserPassword("<user>", "<new_password>")
use notifications
db.changeUserPassword("<user>", "<new_password>")
use production
db.changeUserPassword("<user>", "<new_password>")
use routes
db.changeUserPassword("<user>", "<new_password>")
use settings
db.changeUserPassword("<user>", "<new_password>")
use staging
db.changeUserPassword("<user>", "<new_password>")
use stats
db.changeUserPassword("<user>", "<new_password>")
use translationResource
db.changeUserPassword("<user>", "<new_password>")
use user
db.changeUserPassword("<user>", "<new_password>")
use information
db.changeUserPassword("<user>", "<new_password>")
use gateway_async
db.changeUserPassword("<user>", "<new_password>")
SYSTRAN components configuration files
Update all Systran component configuration files listed in MongoDB authentication article with new password as below
Corpus Manager
Linux
/opt/systran/corpus-manager2/etc/cm.cfg
Windows
C:\Program Files\Systran Enterprise Server\Systran Corpus Manager\etc\cm.cfg
Configuration change
# Authentication
mongodb-user = sesuser
mongodb-password = new_password
DCT-Indexer
Linux
/opt/systran/dct-indexer/etc/dcti.cfg
Windows
C:\Program Files\Systran Enterprise Server\Systran DCT Indexer\etc\dcti.cfg
Configuration change
mongodb-user = sesuser #MongoDB user
mongodb-password = new_password #MongoDB password
GDict
Linux
/opt/systran/gdict/etc/gdict.cfg
Windows
C:\Program Files\Systran Enterprise Server\Systran GDict Server\etc\gdict.cfg
Configuration change
mongodb-user = sesuser #MongoDB user
mongodb-password = new_password #MongoDB password
Routing Server
Linux
/opt/systran/routing/etc/rs.cfg
Windows
C:\Program Files\Systran Enterprise Server\Systran Routing Server\etc\rs.cfg
Configuration change
mongodb-user = sesuser #MongoDB user
mongodb-password = new_password #MongoDB password
TM-Indexer
Linux
/opt/systran/tm-indexer/etc/tmi.cfg
Windows
C:\Program Files\Systran Enterprise Server\Systran TM Indexer\etc\tmi.cfg
Configuration change
mongodb-user = sesuser #MongoDB user
mongodb-password = new_password #MongoDB password
Dispatcher
Linux
/opt/systran/translation-dispatcher/etc/std.cfg
Windows
C:\Program Files\Systran Enterprise Server\Systran Translation Dispatcher\etc\std.cfg
Configuration change
async-mongodb-user = sesuser
async-mongodb-password = new_password
SES Console
Linux
/opt/systran/apps-node/enterprise-server/config/default.yaml
Windows
C:\Program Files\Systran Enterprise Server\Systran SES Console\config\default.yaml
Configuration change
User:
login: sesuser
password: new_password
Linux
/opt/systran/apps-node/enterprise-server/config/database.json
Windows
C:\Program Files\Systran Enterprise Server\Systran SES Console\config\database.json
Configuration change
"User": {
"login": "sesuser",
"password": "new_password"
}
TRS
Linux
/opt/systran/apps-node/translation-resource-store/config/default.yaml
Windows
C:\Program Files\Systran Enterprise Server\Systran Translation Resource Store\config\default.yaml
Configuration change
User:
login: sesuser
password: new_password
Gateway
Linux
/opt/systran/apps-node/translation-gateway/config/default.yaml
Windows
C:\Program Files\Systran Enterprise Server\Systran SES Gateway\config\default.yaml
Configuration change
User:
login: sesuser
password: new_password
Restart all Systran components
Linux (RedHat/CentOS 7)
for i in $(systemctl -a | grep -o "systran.*service"); do systemctl restart $i; done
Linux (RedHat/CentOS 6)
for i in $(ls /etc/init.d | grep systran); do service $i restart; done
Windows
Start/Administrative Tools/Services then right click on the followed services > Restart
- Systran Corpus Manager
- Systran DCT Indexer
- Systran GDict Server
- Systran Lookup Server
- Systran Routing Server
- Systran SES Console
- Systran SES Gateway
- Systran TM Indexer
- Systran Translation Dispatcher
- Systran Translation Resource Monitor
- Systran Resource Store