Tuesday, February 19, 2019

Fix your server's certificate or use --servercert to trust it OpenConnect

When you try to connect your VPN using OpenConnect 7.08 you may encounter below error. 

The --no-cert-check option was insecure and has been removed.
Fix your server's certificate or use --servercert to trust it.

Fix ::

Fix your server's certs (perhaps using LetsEncrypt), or fetch the cert
and use it in a --cafile option, or use the --servercert option (which
is helpfully suggested now on the command line when you are prompted to
manually accept a cert).

But don't use --no-cert-check. That's just insecure or skip --no-cert-check option.And wont work any more from 7.08 onwards.



Monday, March 6, 2017

Steps for fixing SSO certificate issue on Cisco CloudCenter 4.7

Updated guide:

1) Upload attached file (samlKeystore.jks). In case of HA mode it needs to do on both CCMs.

# cd /usr/local/tomcat/webapps/ROOT/WEB-INF/lib/
# cp /tmp/samlKeystore.jks security/

version of library based on CCC version:

# cp cliqr-security-4.7.2.jar ~/
# jar uf cliqr-security-4.7.2.jar security/samlKeystore.jks
# chown -R cliqruser.cliqruser cliqr-security-4.7.2.jar
# rm –rf security

2) /etc/init.d/tomcat restart
a)      For HA mode stop tomcat service on second CCM

3) log in to CCM with admin@osmosix.com user and on Manage Vendor Admins go to Authentication settings click on Update button. That would update corresponding metadata file.


4) Download SP Metadata XML file
            a) for HA mode copy xml file from CCM1 to CCM2, make sure permissions are the same as CCM1. Location of xml is  /usr/local/osmosix/metadata/sp/
            b) start tomcat service on second CCM
5) Upload that XML file to IDP
6)Validate solution

In case of multy tenants – it needs to repeat steps 3-5 for each tenant.




Thursday, January 5, 2017

Network connection automatically keeps down and up on Centos7


You can find below error on /var/log/message/


Issue:: 

NetworkManager[642]: <info> Activation (enp0s3) successful, device activated.
avahi-daemon[531]: Registering new address record for fe80::a00:27ff:fe6a:55a4 on enp0s3.*.
qidiziCentos kernel: e1000: enp0s3 NIC Link is Down
NetworkManager[642]: <info> (enp0s3): link disconnected (deferring action for 4 seconds)
NetworkManager[642]: <info> (enp0s3): link disconnected (calling deferred action)
NetworkManager[642]: <info> (enp0s3): device state change: activated -> unavailable (re


fix ::


$ systemctl restart networkmanager
$ systemctl restart network
$ ifdown <devicename, e.g. enp0s8>
$ ifup <devicename, e.g. enp0s8>

Tuesday, September 27, 2016

Error: no C compiler found

When you are getting below error while compiling .

Configuring for  Linux-x86_64
Checking for gcc : No
Checking for cc : No
error: no C compiler found

try  

yum groupinstall "Development Tools"

After that you can try the compilation of Code Blocks again.



Monday, June 1, 2015

How to Reset a Wordpress Password

If you have forgotten your wordpress credentials, or possibly have had your wordpress install compromised; you may find yourself needing to change your admin username and/or password to regain access to your site.

Reset a User's password through MySQL
  • Log in to your wordpress database using MySQL's command line interface
  • Find the ID of the user's password you want to change
SELECT ID, user_login, user_pass FROM wp_users;
  • Change that user's password to a new one
UPDATE wp_users SET user_pass=MD5('newstrongpassword') WHERE ID = usersID;

Reset a User's Password through phpMyAdmin

If you have Plesk or cPanel, phpmyadmin should be included by default. Open it up for the domain and database that your wordpress site belongs on. If you don't remember the database name, look in your wp-config.php for a line similar to this:
define('DB_NAME', 'wordpress_blog');
In this example, "wordpress_blog" is the name of the database.
  • Once you're logged in to phpmyadmin, click on the wp_users table.
  • Make sure you are on the browse screen
  • Find the username you want to change the password for
  • Click edit on that username
  • Enter in your new password in the Value field of the user_pass line
  • Select "MD5" from the dropdown under the Functions column for the user_pass line
  • Click Go at the bottom of the screen, and then you should be able to log in with the new password

How to change the primary IP addres of a cPanel server



Log in to SSH, and do the following:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0

Change the IPADDR and GATEWAY lines to match the new IP and Gateway for the new ip


Edit /etc/sysconfig/network
Change the GATEWAY line here if it does not exist in the ifcfg-* file.


Edit /etc/ips
Remove the new primary IP from this file if it is present
Add the old primary IP to this file with the format ::


Edit /var/cpanel/mainip
Replace the old primary IP with the new primary IP


Edit /etc/hosts
Replace the old primary IP with the new one if needed. The hostname's dns will need to be updated too


Restart the network service to make the new IP the primary
service network restart
Note: You're probably going to be disconnected at this point, and have to log in to ssh using the new primary ip.


Restart the ipaliases script to bring up the additional IP
service ipaliases restart


Run ifconfig and make sure all IPs show up correctly


Update the cpanel license to the new primary IP


Verify you can still log in to WHM and there is no license warning
Verify cPanel

Tuesday, May 19, 2015

Linux Crontab

Linux Cron utility is an effective way to schedule a routine background job at a specific time and/or day on an on-going basis.

Linux Crontab Format


MIN HOUR DOM MON DOW CMD
*        *           *        *       *         

Table: Crontab Fields and Allowed Ranges (Linux Crontab Syntax)
FieldDescriptionAllowed Value
MINMinute field0 to 59
HOURHour field0 to 23
DOMDay of Month1-31
MONMonth field1-12
DOWDay Of Week0-6
CMDCommandAny command to be executed.