Script to set a random PIN for a Cisco Unified Communications Manager user and email it to them. Tested against CUCM 10.5(2).
It uses nodemailer with gmail for testing, but nodemailer can be configured to use any SMTP service. See their documentation for more detail on that.
node CUCMPIN testuser testuser@domain.com
The only external modules required for this script are:
- nodemailer
- xml2js
These can be installed by downloading this repository and running npm install
.
Alternatively these can be installed manually by creating a new directory and running the following commands:
npm install nodemailer
npm install xml2js
Once these are installed, you can download the script and amend the following variables at the top as required:
- axlUser : this is an account with permissions for using AXL and updating the users pin
- axlPassword : the password associated with that account
- cucmHost : the hostname for the communications manager server
- emailUser : the account that emails will be sent from (currently on gmail, but can be changed)
- emailPassword : the password for the gmail account. For testing I created an app password in gmail.