Phoning it in – Bashing UCOS

Standard

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.

ucos-root-001

Once the ISO boots, select Troubleshooting.

ucos-root-002

And then Rescue a CentOS System

ucos-root-003

Press 1 to continue and then enter to access the shell.

ucos-root-004ucos-root-005

Next type chroot /mnt/sysimage to gain root access to the system.

ucos-root-006

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.

ucos-root-007

The root account is set to nologin by default so use vi to change the root account to use /bin/bash instead.

ucos-root-008ucos-root-009

Next we need to permit root logins through ssh, I’ll use sed to change it since it makes better screenshots 🙂

ucos-root-010

Lastly we need to set SELinux to be permissive instead of enforcing.

ucos-root-011

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.

ucos-root-013ucos-root-014


			

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s