When my UC lab blew up I contacted Cisco to get all the licenses reset which they promptly did, but to my absolute horror I found out I gave them the wrong mac address for my UCCX VM!!!!!!!!!!!! Since sending a email to the friendly TAC lady is far to much work and frankly a boring blog topic, let’s instead enable the bash shell in my UCCX and change the mac address to be what I sent them 🙂
Breaking in
This procedure should work for all UCOS servers however it should be stated
Don’t do this in production systems!!!!!
Ok? Good!
Download a Centos 7 ISO and mount it to the VM, CUCCX01 in my case.
Reboot the VM and access the Boot Menu by pressing esc as it boots, if you don’t have my cat like reflexes then you can set the VM to boot into bios under the VM Options or adding something like bios.bootDelay = “8000” to the vmx file.
Once your in, boot from CD-ROM Drive.
Once the ISO boots, select Troubleshooting.
And then Rescue a CentOS System
Press 1 to continue and then enter to access the shell.
Next type chroot /mnt/sysimage to gain root access to the system.
Now we will focus on gaining root access through SSH.
First we have to remove the /etc/securetty file because those restrictions aren’t the boss of us.
We also need to set a password for root.
The root account is set to nologin by default so use vi to change the root account to use /bin/bash instead.
Next we need to permit root logins through ssh, I’ll use sed to change it since it makes better screenshots 🙂
Lastly we need to set SELinux to be permissive instead of enforcing.
Go ahead and reboot and you should be able to SSH into the bash shell of the UC server! This is handy for getting a deeper knowledge of the system and doing some troubleshooting.
iMac01:~ the-packet-thrower$ ssh root@10.10.14.106 The authenticity of host '10.10.14.106 (10.10.14.106)' can't be established. RSA key fingerprint is SHA256:jVjyw4sRNn7qcwB7E1vI4KI42azga4h2v5fxDtyi95s. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '10.10.14.106' (RSA) to the list of known hosts. root@10.10.14.106's password: [root@CUCCX01 ~]#
Changing the License
If you find yourself in a situation where it makes sense to change your UCCX servers license mac then you can edit the FinalString line in the /usr/local/bin/base_scripts/LicenseMac.sh from a SHA1 based value to the lower case mac address with no colons.
Then when you reboot it will be fine.