프롬프트에 최초 커넥션 유저 표시/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..
import boto3from botocore.exceptions import ClientErrorimport jsondef get_policy_document(iam_client, policy_arn): """ IAM 정책의 문서를 가져옵니다. :param iam_client: Boto3 IAM 클라이언트 :param policy_arn: 조회할 IAM 정책의 ARN :return: 정책 문서 (JSON 형식) """ try: response = iam_client.get_policy(PolicyArn=policy_arn) policy_version_id = response['Policy']['DefaultVersionId'] ..
import boto3from botocore.exceptions import ClientErrordef attach_policy_to_role(profile_name, role_name, policy_arn): """ IAM 역할에 정책을 연결합니다. :param profile_name: AWS CLI 프로파일 이름 :param role_name: 정책을 연결할 IAM 역할의 이름 :param policy_arn: 연결할 IAM 정책의 ARN """ # 지정된 프로파일을 사용하는 세션 생성 session = boto3.Session(profile_name=profile_name) # 세션에서 IAM 클라이언트 생성 iam_client = sessio..
import boto3import json# 프로파일 이름과 관련된 정보를 리스트로 관리profiles = ['fendys-prodn','fendys-dev']# IAM 정책 문서 정의policy_document = { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:*" ], "Resource": "*" }, { "Effect": "Allow", "Action": [ "network-firewall:*..
import boto3import json# IAM 역할을 생성하고 태그를 추가하는 함수def create_role_and_add_tags(profile_name, role_name, trust_policy, tags): # 세션 생성 session = boto3.Session(profile_name=profile_name) iam_client = session.client('iam') # IAM 역할 생성 print(f"Creating role {role_name} in profile {profile_name}...") response = iam_client.create_role( RoleName=role_name, AssumeRolePo..
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...
- Total
- Today
- Yesterday
- cgroup
- dl20
- dl20 centos7
- linux command log
- kernel 변경
- ansible ios
- nxos ansible
- windows.old 강제삭제
- ansible network
- cmd로 윈도우 계정 관리
- 윈도우서버 계정 관려
- nutanix rac
- 특정 라인삭제
- 특정 문구 치환
- 리눅스 커맨드 로그남기기
- cmd로 계정 생성
- ILO
- centos7 ntp
- shell connmad log
- dl20 g9 centos7 설치
- chrony
- oracle linux8 kernel
- ipmi
- DL20 GEN9 장비에 CentOS 7
- 윈도우 cmd 계정 관리
- cisco ansible
- ISCSI 볼륨 RAC
- vm rac
- ios ansible
- CentOS 7 GUI
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
