본문 바로가기

Linux & Unix

(22)
Linux PAM (Pluggable Authentication Modules) in RHEL8/CentOS8 RHEL8 / CentOS 8 에서 Linux PAM 버전이 올라가면서, RHEL7 / CentOS7 에서 사용하던 pam_tall2.so 모듈이 대체됨. #이 부분에 잘못된 모듈이 적용되는 경우, 콘솔/원격 로그인이 안 되는 현상이 발생 (로그인이 필요하지 않은 복구 모드나, ramdisk 모드에서 수정 복구) pam_tally2.so 가 사용 되는 파일 /etc/pam.d/ |__system-auth |__password-auth pam_faillock - Module counting authentication failures during a specified interval pam_tally2.so | | V pam_faillock.so
Linux Bus 주소로 PCI Slot 번호 확인 ## Bus Address 확인 명령 lspci lspci | grep -i hba lspci | grep -i ethernet lspci | grep -i raid ## PCI slot 번호와 연결된 Bus Address 확인 dmidecode -t slot dmidecode -t slot | grep -e PCI-E -e Bus ## PCI Slot 에 해당하는 Bus Address 와, lspci 에서 찾은 device 의 Bus Address 를 매칭 lspci | grep -i hba ----------------------------------------------------------------------------------------------- 0a:00.0 Fibre Channel: ..
CentOS 설치 미디어 부팅 구조 # CentOS 7.4 기준 CentOS 설치 미디어 부팅 구조 Anaconda boot image for BIOS isolinux/isolinux.bin Anaconda boot image for UEFI EFI/BOOT/BOOTX64.EFI Anaconda 부팅 config for BIOS isolinux/isolinux.cfg for BIOS Anaconda 부팅 config for UEFI EFI/BOOT/grub.cfg for UEFI images/product.img Anaconda 에 의해 로드됨 cpio,gziped file mkisofs 옵션 -o custom.iso 생성되는 파일 이름 -b isolinux/isolinux.bin announces a data file as El Tori..
CentOS 6.10 - init.d 스크립트의 NETWORKING 변수 /etc/init.d/nfs start 가 정상 동작하지 않아 스크립트 확인 [ "${NETWORKING}" != "yes" ] && exit 6 /etc/sysconfig/network 파일에 아래 항목 추가 NETWORKING=yes 수정 적용 후 nfs restart 를 하였으나. lock 파일들에 의해 정상 기동하지 않는다. lock 파일을 찾아 지워줘도 될 것 같았으나, 깔끔하게 리부팅하기로 함. 리부팅하고 nfs 는 정상적으로 running 상태 확인
linux command - stat , statx (file timestamps) stat 파일의 timestamp 확인 - atime : Access. ls -lu - mtime : 내용 수정. ls -l (default) - ctime : inode 변경. ls -lc stat ls --time-style=long-iso -lu ls --time-style=long-iso -l ls --time-style=long-iso -lc statx - btime (birth, creation timestamp) 정보가 표시 - kernel 4.11 에 추가됨. ( kernel 4.18 인 RHEL 8 부터 사용 가능해 보임 ) - glibc 2.28 에서 라이브러리 지원 추가
linux 로그 - Permanent journal (systemd-journald) journald 의 로깅 파일 위치는 아래 /run/log/journal/ -> /run 은 tmpfs (메모리파일시스템) 으로 리부팅하는 경우 이전 로그는 사라짐 -> syslog 에 의해 /var/log/messages 에 로그가 지속 저장되긴 한다. 디렉토리와 하위 로그 파일의 소유자 및 그룹 : root.systemd-journal ## journal 로그 파일의 영구 저장 방법 mkdir -p /var/log/journal chown root.systemd-journal /var/log/journal systemctl restart systemd-journald.service journald 가 재시작된 후 로깅 파일 위치가 변경 /run/log/journal/ -> /var/log/journal/
Disable Ctrl-Alt-Delete In RHEL7, RHEL8 systemctl mask ctrl-alt-del.target # Disable CAD readlink /etc/systemd/system/ctrl-alt-del.target ls -l /etc/systemd/system/ctrl-alt-del.target # /etc/systemd/system/ctrl-alt-del.target -> /dev/null 원본 파일은 /usr/lib/systemd/system/ctrl-alt-del.target 이고, custom 파일이 /etc/systemd/system/ 에 생성된다. 원본 파일은 reboot.target 을 link 하고 있으나, mask 를 씌우면 /etc/systemd/system/ctrl-alt-del.target 이..
shell script (bash) - REDIRECTION &>word >&word >word 2>&1 stdout & stderr 를 같은 파일(word)로 &>>word >>word 2>&1 appending