Author: karlo
-
Spotify on fedora
dnf config-manager –add-repo=http://negativo17.org/repos/fedora-spotify.repo && yum update && yum -y install spotify-client
-
xfce4 terminal shortcut
open xfce4-settings-manager keyboard (while you are there, set Restore Num Lock on startup) application shortcuts add xfce4-terminal shortcut
-
Fix: Digital ID name cannot be found by underlying security system
I got this error when sending signed emails using my outlook cert by Digicert. Solution: Open certmgt Navigate to Personal/Certificates Delete the signing cert Import your cert from backup (or request a new one) Select again in Security center in outlook
-
Bash array operations and examples
Split to array: while IFS=’;’ read -ra ADDR; do for i in “${ADDR[@]}”; do # process “$i” done done <<< “$IN” Define: distro=(“redhat” “debian” “gentoo”) Element: ${ArrayName[subscript]} Length: echo “${#distro[@]}” Example !/bin/bash define array name server names FQDN NAMESERVERS=(“ns1.nixcraft.net.” “ns2.nixcraft.net.” “ns3.nixcraft.net.”) get length of an array tLen=${#NAMESERVERS[@]} use for loop read all nameservers for ((…
-
Bash color variables
# Reset Color_Off=’\033[0m’ # Text Reset # Regular Colors Black=’\033[0;30m’ # Black Red=’\033[0;31m’ # Red Green=’\033[0;32m’ # Green Yellow=’\033[0;33m’ # Yellow Blue=’\033[0;34m’ # Blue Purple=’\033[0;35m’ # Purple Cyan=’\033[0;36m’ # Cyan White=’\033[0;37m’ # White # Bold BBlack=’\033[1;30m’ # Black BRed=’\033[1;31m’ # Red BGreen=’\033[1;32m’ # Green BYellow=’\033[1;33m’ # Yellow BBlue=’\033[1;34m’ # Blue BPurple=’\033[1;35m’ # Purple BCyan=’\033[1;36m’ #…
-
Certbot centos 7
pip uninstall requests yum reinstall python-requests pip uninstall six yum reinstall python-six pip uninstall urllib3 yum reinstall python-urllib3 ; yum install http://cbs.centos.org/kojifiles/packages/pyOpenSSL/16.2.0/3.el7/noarch/python2-pyOpenSSL-16.2.0-3.el7.noarch.rpm ; yum install certbot certbot-apache
-
Get x11 forwarding working on Centos 7 & Putty & Xming
Install xming Set up putty, use x forwarding, diplay loc localhost:0.0, rest is default Start xming On centos: Test using xclock. If $DISPLAY is not set you did it wrong. You can also test mobaxterm, it works well.
-
Auto root login Centos 7 / EL 7
sed -i ‘/ExecStart/ s/agetty/agetty –autologin root/’ /etc/systemd/system/getty.target.wants/getty@tty1.service
-
Set up TOTP/Google authenticator on Centos 7
Remember to keep an SSH session open (in a separate terminal) while doing this. yum install google-authenticator google-authenticator follow steps, save backup stuff vim /etc/ssh/sshd_config: ChallengeResponseAuthentication yes ; PermitRootLogin yes ; PasswordAuthentication yes vim /etc/pam.d/ssh, add “auth required pam_google_authenticator.so” after the auth line with password. Now you can also set up httpd to use this:…
-
Ovirt POSIX storage failing – Error while executing action Add Storage Connection: Problem while trying to mount target
umount the thing really, check mount tune2fs -O ^has_journal /dev/mapper/hdd-direct echo 1 > /proc/scsi/sg/allow_dio
-
Found ArcSight parser functions
Updated 2020-08-27 =__BASE64Decode=__LOOKUP=__byteArrayToIPv6=__byteArrayToIPv6String=__collection=__concatenate=__concatenateDeleting=__createGMTTimeStamp=__createLocalTimeStampFromGMT=__createLocalTimeStampFromGMTSecondsMillis=__createLocalTimeStampFromNTP=__createLocalTimeStampFromNanoSeconds=__createLocalTimeStampFromSecondsMicrosZone=__createLocalTimeStampFromSecondsSinceEpoch=__createLocalTimeStampStringFromGMTMilliseconds=__createLocalTimeStampStringFromLocalMilliseconds=__createOptionalTimeStampFromString=__createSafeLocalTimeStamp=__createTimeStamp=__createTimeStampByHexEncodedTime=__createTimeStampByStartTimeElapsed=__createTimeStampForOpsecStartTime=__doubleToAddress=__extractNTDomain=__extractNTUser=__extractProtocol=__foundScanHostName=__getCEFSeverity=__getDeviceDirection=__getIpV6AddressFromHighLow=__getIronMailActions=__getIronMailAlertImpact=__getIronMailEventStatus=__getLongMACAddressByHexString=__getLongMACAddressByString=__getManhuntPriority=__getNormalizedOS=__getNotZeroPort=__getOriginator=__getOriginatorFromSourcePort=__getProtocolName=__getProtocolNameFromString=__getSymantecNSPriority=__getTimeZone=__getTrendMicroHostName=__getTrendMircoUser=__getType=__getVendor=__getVulnerabilityCategory=__getXForceStringFor=__hexStringToAddress=__hexStringToIPV6Address=__hexStringToLong=__hexStringToString=__hourMinuteSecondsToSeconds=__ifAorBThenElse=__ifGreaterOrEqual=__ifThenElse=__ifThenElseAddress=__ifTrueThenElse=__ignoreZeroIp=__ignoreZeroMac=__integerConstant=__integerToAddressMcAfee=__integerToLong=__length=__longToDot4QuadAddress=__longToInteger=__longToString=__longToTimeStamp=__mazuProfilerDestinationAddress=__multilineRegexToken=__noDot4QuadStringsToAddress=__numberToAddress=__oneOf=__oneOfAddress=__oneOfDateTime=__oneOfHostName=__oneOfInteger=__oneOfLong=__oneOfMac=__oneOfNetBIOSName=__parseMultipleTimeStamp=__parseMutableTimeStamp=__parseMutableTimeStampSilently=__parseSignedLong=__regexToken=__regexTokenAsAddress=__regexTokenAsInteger=__regexTokenAsLong=__regexTokenFindAndJoin=__regexTokenNoWarning=__replaceAll=__replaceFirst=__safeToDate=__safeToDouble=__safeToInteger=__safeToLong=__safeToRoundedLong=__setYearToCurrentYear=__signedNumberToAddress=__simpleMap=__split=__splitAsAddress=__splitAsInteger=__stringConstant=__stringToIPv6Address=__stringTrim=__subParse=__sum=__toGMTTimeStamp=__toHex=__toLocalTimeStamp=__toLongTimeStamp=__toLowerCase=__toUpperCase=__uri=__useCurrentYear=__variableTypeToAddress=__verifyHexString
-
Linux screencasting with overlays and all: OBS
OBS is awesome, just learned about it today. https://obsproject.com/
-
Tail: prepend file name to tailing output (bash)
cd /opt/arcsight/connectors/; tail -f *_con1_rsyslog_paloalto_2500*/current/logs/agent.out.wrapper.log | awk ‘/^==> / {a=substr($0, 5, length-8); next} {print a”:”$0}’
-
Node Rocketchat npm fibers not running ( versionGLIBCXX_3.4.20 not found ) on centos/rhel
cd /opt/Rocket.Chat/programs/server/node_modules/fibers/ ln -s /usr/local/n/versions/node/8.9.3/bin/node-gyp /bin/ node-gyp rebuild cp build/Release/fibers.node bin/linux-x64-57/fibers.node https://github.com/RocketChat/Rocket.Chat/issues/9167#issuecomment-352804066
-
Personal (manual) template for internal hosts
This might help someone else, too. These are the things I do for an internal VM (on my hypervisor at home). This document will/might evolve over time. Default OS is centos7. yum -y install epel-release && yum -y update && yum -y install wget vim htop tcpdump yum-cron yum-utils ntp figlet lynis bind-utils bash-completion mlocate…
-
ArcSight upgrade/install “Unable to carry out the checkLocalHost check.”
fix: mount -o remount,rw,exec /tmp
-
Bash suppress all output of script (echo off – style)
exec 1>/dev/null 2>/dev/null at the top of your script
-
Certmonger defunct RHEL7
getcert modify-ca -c dogtag-ipa-retrieve-agent-submit -e /usr/libexec/certmonger/dogtag-ipa-ca-renew-agent-submit fixed for me, see helper lines in /var/lib/certmonger/cas/*
-
Install Domoticz on Centos 7
Old version below NEW ADDED NOTES (Thanks Charles Orbello) The new version of domoticz requires a new version of cmake and the old version of domotics need a different version of open-zwave flow work with the following release (and I added libusb-devel for my zigate ): wget https://github.com/domoticz/domoticz/archive/3.8153.tar.gz wget https://github.com/OpenZWave/open-zwave/archive/V1.5.tar.gz We are…
-
Dell get serial / service tag on windows / linux
Getting asset tag in Windows: wmic bios get serialnumber Getting asset tag in Linux: dmidecode -t1
-
Yum Error: database disk image is malformed fix
root@host:~# yum update Loaded plugins: product-id, search-disabled-repos, security, subscription-manager Setting up Update Process Error: database disk image is malformed root@host:~# yum clean all Loaded plugins: product-id, search-disabled-repos, security, subscription-manager Cleaning repos: * Cleaning up Everything root@host:~# mv /var/lib/rpm/__db* /tmp root@host:~# rpm –rebuilddb
-
Nagios check_http HTTP WARNING: HTTP/1.1 400 Bad Request – 1307 bytes in 0.084 second response time
Change -I to -H in your arguments. HTTP WARNING: HTTP/1.1 400 Bad Request – 1307 bytes in 0.084 second response time
-
MS outlook quoting inline
I am not a big fan of Outlook, but if you want to do proper inline quoting, ctrl-q might help you getting rid of the vertical (blue) bar. Also see this answer on SO.