Skip to content

Instantly share code, notes, and snippets.

@lilongen
lilongen / how.to.configure.supported.browsers.for.Kerberos.and.NTLM
Last active April 26, 2025 16:17
How to configure supported browsers for Kerberos and NTLM
# from https://ping.force.com/Support/PingFederate/Integrations/How-to-configure-supported-browsers-for-Kerberos-NTLM#chrome
How to configure supported browsers for Kerberos and NTLM
Published: 01/25/2018
The PingFederate Integrated Windows Authentication (IWA) Adapter supports the Kerberos and NTLM authentication protocols, but some browsers need to be configured to utilize them. The following guide will define which settings are necessary in each browser.
For Kerberos and NTLM authentication, the PingFederate IWA Adapter utilizes the SPNEGO (Simple and Protected GSS-API Negotiation) mechanism to negotiate either Kerberos or NTLM as the underlying authentication protocol. Each browser below supports SPNEGO, but differences exist that may affect which protocol is negotiated in each instance, due to the combination of browser and OS.
The PingFederate IWA Adapter supports the following browsers:
@lilongen
lilongen / run-ansible-with-any-host-without-inventory
Last active May 5, 2023 23:16
How to run Ansible without specifying the inventory but the host directly?
Question:
. How to run Ansible without specifying the inventory but the host directly?
. Run a playbook or command with arbitrary host not in the inventory hosts list?
. run ansible with arbitrary host/ip without inventory?
Answer:
Surprisingly, the trick is to append a ,
The host parameter preceding the , can be either a hostname or an IPv4/v6 address.
ansible all -i example.com,
@lilongen
lilongen / tcpdump-http-capture
Created April 26, 2016 07:07
tcpdump http data packet capture examples
#dump http response
tcpdump -s 0 -A 'src port 80 and tcp[((tcp[12:1]&0xf0)>>2):4]=0x48545450'
tcpdump -s 0 -A 'src port 80 and tcp[((tcp[12:1]&0xf0)>>2):4]='$(python -c "print '0x' + ''.join(hex(ord(i))[2:] for i in 'HTTP')")
#dump http post request, following two are equal, 0x504f5354 <-> POST
tcpdump -s 0 -A 'dst port 80 and tcp[((tcp[12:1]&0xf0)>>2):4]=0x504f5354'
tcpdump -s 0 -A 'dst port 80 and tcp[((tcp[12:1]&0xf0)>>2):4]='$(python -c "print '0x' + ''.join(hex(ord(i))[2:] for i in 'POST')")
#dump http get request
tcpdump -s 0 -A 'dst port 80 and tcp[((tcp[12:1]&0xf0)>>2):4]='$(python -c "print '0x' + ''.join(hex(ord(i))[2:] for i in 'GET ')")
@lilongen
lilongen / mac.chrome.access.hadoop.secure.webui
Last active April 15, 2022 04:46
macos.chrome.access.hadoop.secure.webui
1.a /etc/krb5.conf
1.b export KRB5_CONFIG=/etc/krb5.conf
2. kinit
3. "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --auth-server-whitelist="*" --auth-negotiate-delegate-whitelist="*"
Issue & solutions:
I_1: Kerberos kinit: Unknown credential cache type while getting default ccache
A: Just comment the attribute default_ccache_name
https://stackoverflow.com/questions/48836113/kerberos-kinit-unknown-credential-cache-type-while-getting-default-ccache
@lilongen
lilongen / deploy-cm-cdh-on-centos7
Last active August 28, 2021 11:36
Centos 7 install/deploy Cloudera Manager and CDH using local repository and CDH local parcel
- prepare work
a. make cm node can ssh to all nodes without password
ssh-genkey, ssh-copy-id
b. hostname mapping
c. mysql server
d. postgresql
e. ntp
systemctl disable chrony
centos7 default enable chrony server, even enable ntpd, cuase chrony started, ntpd will not started
this will cause CDH ntp error, so need to disable chrony.
@lilongen
lilongen / 生活小窍门.如何不让电视遥控器能控制灯.电视遥控器可以控制灯的问题
Last active February 14, 2020 10:57
生活小窍门.如何不让电视遥控器能控制灯.电视遥控器可以控制灯的问题
1. 使用几个废弃的遥控器(遥控器得是好的
2. 墙壁开关按到关灯10秒后开灯,开灯3秒内对着灯按遥控器上的任意键,灯自动闪三次后设置成功(有可能没反应, 不过没关系)
3. 再次继续关灯10秒后开灯,开灯3秒内按遥控器上的其他按键
4. 设置4次之后按电视遥控器检测是否有影响
5. 这样设置过后, 之前电视遥控器应该就不能在遥控灯了
@lilongen
lilongen / runit-on-centos
Last active November 22, 2019 10:51
runit-on-centos
curl -s https://packagecloud.io/install/repositories/imeyer/runit/script.rpm.sh | sudo bash
yum install runit-2.1.2-1.el6.x86_64
yum install runit-2.1.1-7.el7.centos.x86_64
https://packagecloud.io/imeyer/runit/packages/el/6/runit-2.1.2-1.el6.x86_64.rpm?page=3
@lilongen
lilongen / generic-makefile-c
Created April 26, 2016 08:42
C Generic Makefile
######################################
#
# Generic makefile
#
# by George Foot
# email: george.foot@merton.ox.ac.uk
#
# Copyright (c) 1997 George Foot
# All rights reserved.
#
@lilongen
lilongen / generic-makefile-c++
Created April 26, 2016 08:43
C++ Generic Makefile
####################################################
# Generic makefile - 万能Makefile
# for compiling and linking C++ projects on Linux
# Author: George Foot Modified:Jackie Lee
####################################################
### Customising
#
# Adjust the following if necessary; EXECUTABLE is the target
# executable's filename, and LIBS is a list of libraries to link in
# (e.g. alleg, stdcx, iostr, etc). You can override these on make's
@lilongen
lilongen / nested.esxi.vm.vsca.workaround
Created June 27, 2019 10:39
nested.esxi.vm.cannot.access.outside.host
1. install esxi on esxi, need to enable esxi vm cpu option "Hardware virtualization": "Expose hardware assisted virtualization to the guest OS "
2. when nested esxi host vm still not bind into vcenter, will exists this issue
solution: Enabling Promiscuous mode on the network of the physical ESXi host worked
3. when nested esxi host vm managed by vcenter, seems does not exist this issue