Thursday, December 21, 2017

Windows Server 2016 Remote Desktop from Ubuntu desktop

Summary

In this post, I'll discuss how to set up a remote desktop session from an Ubuntu client to Windows 2016 Server.

Implementation


Windows-side Configuration


Open up Server Manager, Local Server. 


Click on Remote Desktop.  It will be 'Disabled' on Windows 2016 Standard.  With 2016 Essentials, it's enabled by default.


Choose the 'Allow remote connections to this computer' radio button.  Leave the 'Allow connections only...Network Level Authentication' checkbox selected.  More on that later.  The Administrator will be allowed Remote Desktop access by default.  If you want to add other users, go through the 'Select Users' dialog.

Close this window via the 'OK' button.  Remote Desktop will now show 'Enabled' (may require a screen refresh).  Additionally, Windows will automatically open up the necessary ports through its firewall to enable access to Remote Desktop.  

Ubuntu-side Configuration


rdesktop
rdesktop is a commonly-used RDP client on Ubuntu.  It doesn't appear that development of rdesktop has kept up with the times.  In particular, rdesktop does not support the current authorization protocols within Windows - specifically, Network Level Authentication.  That 'Allow...Network Level Authentication' checkbox mentioned above enables NLA.

Below is an example rdesktop command to initiate a Remote Desktop session:
rdesktop -g 1152x864 -r clipboard:CLIPBOARD -r sound:off -x l -P 1.2.3.4 -u "yourusername" -p yourpassword
If NLA is turned up on the Windows server, you'll get this error:
ERROR: CredSSP: Initialize failed, do you have correct kerberos tgt initialized ?
Failed to connect, CredSSP required by server.
If you're determined to use rdesktop, the simplest fix is to uncheck NLA box on the Windows server.  It will work after that, albeit with less security for the RDP connections.

freerdp
An alternative to rdesktop is FreeRDP.  It does support NLA.  You can either install it directly from the freerdp github site or simply install the version that's in the Ubuntu repositories - xfreerdp
sudo apt-get install freerdp-x11
Below is a sample command line that will set up a Remote Desktop session to Windows 2016, with NLA enabled:
xfreerdp /v:1.2.3.4 /u:yourusername /p:yourpassword +clipboard /size:1152x864
Creating a command launcher on the Ubuntu desktop for remote desktop can be accomplished with the command below:
gnome-desktop-item-edit --create-new ~/Desktop
This will launch a dialog window:

Copy/paste the xfreerdp command into the 'Command:' text box.

Copyright ©1993-2024 Joey E Whelan, All rights reserved.

Tuesday, December 19, 2017

Installation of Genesys 8.5 Configuration DB on Oracle

Summary


This post discusses deployment of the Genesys Config DB on to an existing Oracle 11g instance.

Implementation


  • The Config Server installation includes directory of SQL scripts for various RDMS flavors.  The included Oracle scripts below:
  • ls sql_scripts/oracle
    CfgLocale_ora.sql  drop_tables_ora.sql  init_multi_multilang_ora.sql  init_multi_ora.sql
    
  • Installation of these scripts requires use of the Oracle command line tool, sqlplus.  That tool is located in the /u01/app/oracle/product/11.2.0/xe/bin directory.  Adding this directory to your PATH can be accomplished via execution of the included environment script in the same directory. This can also be added to your .bashrc script to automatically get the Oracle environment set up on login
  • . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    
  • The individual SQL scripts can now be executed from the sqlplus command line.  Example below. Assumes the command is being executed from the scripts directory.
  • sqlplus
    
    SQL*Plus: Release 11.2.0.2.0 Production on Tue Dec 19 11:39:15 2017
    
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    
    Enter user-name: yourusername
    Enter password: yourpassword
    
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
    
    SQL> @drop_tables_ora.sql
    
  • An alternative to executing each of the 3 scripts separately is the one-liner below:
  • (echo @init_multi_ora.sql; echo @CfgLocale_ora.sql) | sqlplus yourusername/yourpassword @drop_tables_ora.sql
    

Copyright ©1993-2024 Joey E Whelan, All rights reserved.

Genesys 8.5 on CentOS/RHEL 6: Oracle DB Client Error

Symptom

Upon attempting to start Genesys Configuration Server, the following error appears:
08:24:00.714 Std 05022 Process './dbclient_oracle_64' started
./dbclient_oracle_64: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such

Solution

Make the Oracle 11g XE library directory accessible during run time for dynamic linking.
  1. Create a file in /etc/ld.so.conf.d.  In this example, I called it oraclexe.conf
  2. Add the following line to that conf file (path to the Oracle libraries):
  3. /u01/app/oracle/product/11.2.0/xe/lib
    
  4. Execute this command as root to update run-time bindings:
  5. ldconfig -v
    

Snippet of output

/u01/app/oracle/product/11.2.0/xe/lib:
 libdbcfg11.so -> libdbcfg11.so
 libsqora.so.11.1 -> libsqora.so.11.1
 libons.so -> libons.so
 libskgxns.so -> libskgxns.so
 libxdb.so -> libxdb.so
 libqsmashr.so -> libqsmashr.so
 libocrb11.so -> libocrb11.so
 libuini11.so -> libuini11.so
 libntcpaio11.so -> libntcpaio11.so
 libclntsh.so.11.1 -> libclntsh.so.11.1
 libldapjclnt11.so -> libldapjclnt11.so
 libocci.so.11.1 -> libocci.so.11.1
 libnjni11.so -> libnjni11.so
 libodm11.so -> libodm11.so
 libskgxp11.so -> libskgxp11.so
 libnnz11.so -> libnnz11.so
 libheteroxa11.so -> libheteroxa11.so
 libclsra11.so -> libclsra11.so
 libnque11.so -> libnque11.so
 libocijdbc11.so -> libocijdbc11.so
 libhasgen11.so -> libhasgen11.so
 libcorejava.so -> libcorejava.so
 libocrutl11.so -> libocrutl11.so
 libemmas11.so -> libemmas11.so
 libodmd11.so -> libodmd11.so
 libskgxn2.so -> libskgxn2.so
 libcell11.so -> libcell11.so
 libocr11.so -> libocr11.so
 libsqlplus.so -> libsqlplus.so
 libhgotrace11.so -> libhgotrace11.so
 libagtsh.so -> libagtsh.so.1.0

Commentary

A common paradigm in software development is to split out commonly used components into libraries.  In the UNIX/Linux world, those libraries are referred to as shared objects (the 'so' in the names above).  One can determine the library requirements of a given binary with the 'readelf' command.  Example below with the Genesys db client for Oracle:
readelf -d dbclient_oracle_64

Output

Dynamic section at offset 0xc2890 contains 28 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libclntsh.so.11.1]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000f (RPATH)              Library rpath: [/release/lib/oracle/i686-linux-rhe5/11.2.0/lib64]
 0x000000000000000c (INIT)               0x429558
 0x000000000000000d (FINI)               0x4998f8
 0x000000006ffffef5 (GNU_HASH)           0x400240
 0x0000000000000005 (STRTAB)             0x4140c8
 0x0000000000000006 (SYMTAB)             0x405008
 0x000000000000000a (STRSZ)              73271 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000015 (DEBUG)              0x0
 0x0000000000000003 (PLTGOT)             0x6c2ee8
 0x0000000000000002 (PLTRELSZ)           3672 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x428700
 0x0000000000000007 (RELA)               0x427410
 0x0000000000000008 (RELASZ)             4848 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x427310
 0x000000006fffffff (VERNEEDNUM)         6
 0x000000006ffffff0 (VERSYM)             0x425f00
 0x0000000000000000 (NULL)               0x0

Copyright ©1993-2024 Joey E Whelan, All rights reserved.

Monday, December 18, 2017

Genesys 8.5 Linux Installation Error: bad ELF interpreter

Symptom

  • Attempting to execute a Genesys installation shell script (Linux) and the following error occurs:
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Solution (RHEL/CentOS):


yum -y install glibc.i686

Copyright ©1993-2024 Joey E Whelan, All rights reserved.

Oracle 11g XE Installation on CentOS: Database Configuration failed.

Symptoms

  • Successfully complete the rpm install of 11g XE:
rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm

  • Attempt the next step (configure):
/etc/init.d/oracle-xe configure

  • Receive this error:
Database Configuration failed.  Look into /u01/app/oracle/product/11.2.0/xe/config/log for details

  • In the postDBCreation.log, you see this:
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=yourhostname)(PORT=1521))'

Solution


Ensure your hostname is defined to an IP address.  In particular, add a line item for it in /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
1.2.3.4   yourhostname

Copyright ©1993-2024 Joey E Whelan, All rights reserved.

Saturday, December 2, 2017

WordPress NextGen Gallery Error - No Images Found

Summary

Possible fix below if none of your pictures will display in NextGen Gallery.

Implementation

Check your mysql.log in /var/log.  If you see this, then this post may have the solution for you:
171202 17:17:36 [ERROR] /usr/libexec/mysqld: Table 'wp_ngg_pictures' is marked as crashed and should be repaired
Run the commands below (need to be root):
/etc/init.d/mysqld stop
myisamchk -r wp_ngg_pictures
/etc/init.d/mysqld start

Copyright ©1993-2024 Joey E Whelan, All rights reserved.