1. Abstract How to change ownership to root when trying to mount NAS disk to server (CentOS) but ownership is automatically set to nobody 2. How to use? vi /etc/idmapd.conf : Uncomment, change User/Group Nobody-User = root Nobody-Group = root
Category: OS
Install XenServer
1. Abstract Install XenServer on Desktop Computer XenServer 8.2 • Kernel version: Linux 4.19 • Xen hypervisor version: 4.13 • Control domain operating system version: CentOS 7.5 2. Download https://www.citrix.com/downloads/ ※ Login required 3. Install USB-stick use Rufus : https://rufus.ie/ 4. Install Computer
Clean unuse kernel
1. Intro If you have an old kernel that you are not using, you should delete it. Because it fill up the /boot capacity. 2. How to do? 2.1. check kernel # current kernel uname -a # list kernel sudo dpkg –list | grep linux-image 2.2. Delete old kernel sudo apt purge linux-image-[version] […]
Compare Directory
1. Intro If you want to compare all files in directory A and directory B 2. Command diff -ru dir_A dir_B
Check Sendmail version
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]
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 […]