1. Intro Show Sendmail version 2. Command sendmail -d0.1 < /dev/null | grep -i version
Fail crond
1. Intro If cron does not run with the following error 2. Cause Account password expired. 3. Solution Modify Account’s password max days 3.1. Check default Policy grep “PASS_MAX_DAYS” /etc/login.defs 3.2. Change account Policy chage -E -1 -M 99999 [username] grep “[username]” /etc/shadow
split file
1. Intro split a file into pieces 2. Command 2.1. split by byte split -b [10m / 10k] [file name] 2.2. split by line split -l [line number] [file name]
check python ssl version
1. Intro check python cryptography, ssl version 2. command 2.1. cryptography python import cryptography cryptography.__version__ quit() 2.2. ssl python import ssl ssl.OPENSSL_VERSION quit()
Set date
1. Intro Set date, time 2. Command 2.1. sync NTP : rdate rdate -s time.nist.gov 2.2. manually set date : date date -s “2020-01-31 19:10:00”
CentOS SSH OTP
1. Intro I want to configure OTP to use SSH connection to CentOS server. 2. Setup 2.1. install package yum install -y libtool pam-devel ntp git 2.2. setup ntpd The reason for using ntpd is that OTP is time-based. service ntpd start chkconfig ntpd on chkconfig –list ntpd 2.3. git clone & setup google […]
Ubuntu SSH OTP
1. Intro I want to configure OTP to use SSH connection to Ubuntu server. 2. Setup 2.1. install google OTP sudo apt install libpam-google-authenticator 2.2. setup pam.d, sshd config # pam.d 맨 위에 추가시 Login ID → OTP code → PW 맨 아래 추가시 Login ID → PW → OTP code nullok : otp […]
Write Timestamp on Notepad++
1. Intro If you want write timestamp on notepad++ like notepad(windows) shortcut F5 2. How to do? 2.1. Install Plugin Notepad++ > Plugins > Install “TextFX Characters” 2.2. Set Shortcut Notepad++ > Settings > Shortcut Mapper… > Plugin commands > “I:Date & Time – short format” Double Click
md5sum on Windows
1. Command certutil -hashfile [File] MD5
set timezone
1. Intro Set timezone 2. Command ll /usr/share/zoneinfo/Asia/Seoul sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime