Thursday, June 29, 2017

Testing the AD User Authentication with Centrify

Test 1: Test with SSH
The simplest way is to enable SSH and connect to it.

Test 2: Test with adinfo
# adinfo -A --user user1
Active Directory password:
Password for user "user1" is correct

Test 3: Test using kinit
# /usr/share/centrifydc/kerberos/bin/kinit user1
# /usr/share/centrifydc/kerberos/bin/klist
Ticket cache: FILE:/tmp/krb5cc_0
Default principal:
Valid starting       Expires           Service principal
  1. Centrify is in connected mode but users are unable to login.

Thursday, May 18, 2017

Installing Octave with HDF5 on CentOS 6.8 with yum

If you are installing octave on CentOS6 and you wish to install HDF5, you may want to pull HDF5 from EPEL instead of RPMFORGE. You may have both repositories so you have to disable RPMFORGE first

# yum-config-manager --disable rpmforge

Install Octave with HDF5

# yum install octave hdf5 hdf5-devel

Monday, April 17, 2017

Generating public keys from a SSH private key

If you just need to generate a Public Key from SSH Private Key, you will need to
# ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/
where  -y output the public key

  1. How do I retrieve the public key from a SSH private key?

Wednesday, April 12, 2017

Installing OpenCV on CentOS 6 on yum

Installing OpenCV using CentOS 6 using yum is very straightforward. For CentOS 6,
# yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-devel

# yum install opencv

Monday, April 10, 2017

Managing MATLAB Users using MLM options for FlexLM

Step 1: Create a file to mlm.opt

Step 2: Edit your license.dat file
SERVER myMATLABLicense 00000000000000009
DAEMON MLM "/usr/local/MATLAB/R2016b/etc/MLM" port=1708 options="/usr/local/MATLAB/R2016b/etc/mlm.opt"

Step 3: Prepare mlm.opt
# Make user names and host names case insensitive when
# listed in a GROUP or HOST_GROUP.  This is not
# required but it is here to prevent some common errors.

# Define GROUP Users
GROUP MATLAB_BLOCK_USERS user1 user2 user3
GROUP MATLAB_INC_USERS user4 user5 user6

# EXCLUDE Users from MATLAB and selected Toolboxes
EXCLUDE "Image_Toolbox asset_info=111111" GROUP MATLAB_BLOCK_USERS
EXCLUDE "Signal_Toolbox asset_info=111111" GROUP MATLAB_BLOCK_USERS

# RESERVE for selected for user1
RESERVE 1 "SIMULINK asset_info=111111" USER user1

# Restrict the number of licenses that can be used on machine "server1"
MAX 4 "MATLAB asset_info=111111" HOST server1

# To exclude ALL features 

#Includes a user or pre-defined group of users, etc.
#Anyone not in an INCLUDEALL statement is not allowed to use these features. 

  2. The Options File
  3. Is there a way to administer FLEXnet based licenses? How do I create an Options file?

Thursday, March 2, 2017

Using Intel IMB-MPI1 to check Fabrics and expected performances

In your .bashrc, do source the
source /usr/local/intel_2015/parallel_studio_xe_2015/bin/ intel64
source /usr/local/intel_2015/impi/ intel64
source /usr/local/intel_2015/composerxe/bin/ intel64
source /usr/local/intel_2015/mkl/bin/ intel64

To simulate 3 workloads pingpong, sendrecv, and exchange with IMB-MPT1
$ mpirun -r ssh -RDMA -n 512 -env I_MPI_DEBUG 5 IMB-MPT1

Friday, February 24, 2017

Compiling Intel FFTW3 and FFTW2 Interface Wrapper Library

FFTW3 wrappers to Intel MKL are delivered both in Intel MKL and as source code which can be compiled to build to build standalone wrapper library with exactly the same functionality. The source code for the wrappers, makefiles are found .....\interfaces\fftw3xc subdirectory in the Intel MKL Directory

Intel FFTW3 Interface Wrapper Library. Do the same for fftw3xc and fftw3xf
# cd interfaces/fftw3xc
# make libintel  INSTALL_DIR=$MKLROOT/lib/intel64
Once Compiled, the libraries are kept $MKLROOT/lib/intel64  

Intel FFTW2 Interface Wrapper Library. Do the same for fftw2xc and fftw2xf
# cd interfaces/fftw2xc
# make libintel  PRECISION=MKL_DOUBLE
# make libintel  PRECISION=MKL_SINGLE
Once Compiled, the libraries are kept $MKLROOT/lib/intel64

Monday, February 20, 2017

Configuring MATLAB FlexNet License Manager to reserve licenses

Step 1: To setup an option file in the Flexlm

Step 2: Create an mlm.opt file
RESERVE 1 MATLAB:asset_info=111111 USER user1
where user1 is the username

Step 3: Restart the license server to take effect

Wednesday, February 8, 2017

Configuring 2 Gateways on the same Linux Box permanently

Suppose you have 2 network on a PC says (eth0 - Private Network) (eth1 - Public Network)

Let's assume the is the Default Gateway for network. If there is a router at for the internal network and you wish to connect to other networks says and networks. You will need to add "static routes" to these networks

route add -net netmask gw
route add -net netmask gw
route add -net netmask gw

To make the setting permanent, edit /etc/sysconfig/network-scripts/route-eth0 via dev eth0 via dev eth0 via dev eth0 

To check the setting is ok
# ip route show

Wednesday, January 18, 2017

SMB Security Best Practices by US-Cert

Taken from  SMB Security Best Practices

US-CERT recommends that users and administrators consider:
  • disabling SMB v1 and
  • blocking all versions of SMB at the network boundary by blocking TCP port 445 with related protocols on UDP ports 137-138 and TCP port 139, for all boundary devices.
US-CERT cautions users and administrators that disabling or blocking SMB may create problems by obstructing access to shared files, data, or devices. The benefits of mitigation should be weighed against potential disruptions to users. For more information on SMB, please review Microsoft Security Advisories 2696547 (link is external) and 204279 (link is external)

Monday, January 16, 2017

Unable to spin down CD-ROM

I have an interesting issues today. My CD-ROM fail to spin down and there is a faulty disk inside the CD-ROM.

Inside the /var/log/messages
Buffer I/O error on device sr0, logical block 0 Error

There is no way you can un-mount the CDROM by the tradtional umount /dev/sr0. If you do a
# ps -afe|grep sr0
user1   11061  9280  0 12:43 pts/0 /sbin/blkid -o udev -p -u noraid /dev/sr0

To do a quick resolve, you can kill the process ID associated with /sbin/blkid -o udev -u noraid /dev/sr0
# kill -9 11061

The CD-ROM should stop spinning

Tuesday, January 3, 2017

Creating a Local Directory Repository to act like a local media for CentOS 6

Just say you wants a local Directory Repository to act like a local media. This happens when you wish to do yum local install from a directory of RPMs only instead of pulling directly from Internet repository.

1. At /etc/yum.repos.d/, create a local repo, something like

# vim /etc/yum.repos.d/local.repo

2. Inside the /etc/yum.repos.d/local.repo,

name=My Local Repo

One more thing you may want to know is that the RPMs from the CentOS Disks including repomd.xml be copied into /home/user1/RPM

3. Disabled the rest of the Repo. For example,
# yum-config-manager --disable rpmforge

4. The Yum will pull from the enabled Repository only.