프롬프트에 최초 커넥션 유저 표시/etc/profile.d에 해당 코드의 파일 하나 생성하고모든유저가 읽기가 가능 하게 644로 권하 변경 필요함(필수) #!/bin/bash # ========================= # ORIGINAL_USER 설정 # ========================= ORIGINAL_USER="${SUDO_USER:-$(who am i | awk '{print $1}')}" # 이미 설정되어 있으면 건드리지 않음 if [ -z "$ORIGINAL_USER" ]; then # sudo 사용한 경우 if [ -n "$SUDO_USER" ]; then export ORIGINAL_USER="$SUDO_USER" # 일반 SS..
request - version check!!!#yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo#yum install terraform#yum install ansible#pip install --upgrade awscli#packer plugins install github.com/hashicorp/amazon#packer plugins install github.com/hashicorp/ansible ###### ami-update.json#### use packer build ami-update.json{ "_comment": "AMI using Amazon Linux2", "va..
oracle linux8 버전에서 검증 되었습니다.grubby --info=ALL #변경 가능한 전체 커널 버전을 보여준다.[root@fendys ~]# grubby --info=ALL index=0kernel="/boot/vmlinuz-5.4.17-2136.300.7.el8uek.x86_64"args="ro crashkernel=auto LANG=en_US.UTF-8 console=tty0 console=ttyS0,115200n8 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 net.ifnames=1 nvme_core.shutdown_timeout=10 nvme_core.io_timeout=4294967295 ipmi_si.tryacpi=0 ipmi_si.trydmi=0 ipmi_si...
sed command를 통해서 아래 포함할문구1 또는 포함할문구2 가 있는 라인은 삭제 하고 /data/result/filename명으로 저장한다. #!/bin/bash for file in ls * do if [ -f $file ] then tmpfile="$file" mkdir -p /data/result wc -l $file >> /data/result/result.log sed -e '/{포함할문구1}\|{포함할문구2}/d' $file > /data/result/$tmpfile wc -l /data/result/$file >> /data/result/result.log fi done sed command를 통해서 아래 {team\\\":{\\\"number\\\":\\\"[0-9]\{16\}} 을..
사전 조건 유저가 직접 패스워드 변경 해야됨 명령어 통제를 그룹 단위로 하고 있음 초기 로그인 시도 시 무조건 패스워드 변경 해야됨 신규 유저 생성시 패스워드 만료 작업이 자주 누락되어 사용함 #!/bin/bash read -p "Your name : " user PS3='Please Select team: ' select team in "a-team" "b-team" do echo "$team - $user " useradd -g $team $user echo 'password1!' | passwd --stdin $user passwd --expire $user break done exit 0
#!/bin/bash today=$(date +%Y%m%d') rbashuser=$(cat /etc/passwd |grep rbash |awk 'BEGIN {FS = ":"} {print $1}'|egrep -v "root|nike|secupang") for user in $rbashuser do auser=$user buser=$(lastlog -u $user |grep $user |awk '{print $1}') #buser=$(lastlog -b 90 -u $user |grep $user |awk '{print $1}') if [ "$auser" != "$buser" ] then echo $auser login !! else echo $auser nologin 90day change nologin ..
- Total
- Today
- Yesterday
- CentOS 7 GUI
- ansible network
- vm rac
- dl20 g9 centos7 설치
- 윈도우 cmd 계정 관리
- 리눅스 커맨드 로그남기기
- dl20 centos7
- linux command log
- kernel 변경
- centos7 ntp
- nutanix rac
- oracle linux8 kernel
- shell connmad log
- cisco ansible
- 특정 라인삭제
- cmd로 윈도우 계정 관리
- windows.old 강제삭제
- ILO
- DL20 GEN9 장비에 CentOS 7
- cmd로 계정 생성
- chrony
- cgroup
- nxos ansible
- 윈도우서버 계정 관려
- 특정 문구 치환
- ipmi
- ISCSI 볼륨 RAC
- ansible ios
- ios ansible
- dl20
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
