본문 바로가기 메뉴 바로가기

fendys

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

fendys

검색하기 폼
  • ALL fendys write (151)
    • AWS (21)
    • linux (93)
    • security (0)
    • ansible (13)
    • monitoring (2)
    • VM (0)
    • DB (4)
    • windows (4)
    • it (12)
    • 가상화폐 (0)
  • 방명록

리눅스 커맨드 로그남기기 (1)
linux shell command log

어떤 유저가 언제 접속해서 무슨 명령어를 사용했는지 확인 하는 방법이다. /etc/profile.d 에 다음 파일 생성 cmdlog.conf export PROMPT_COMMAND='RETRN_VAL=$?;logger -p local3.debug "[$(whoami)][$PWD][$$]: $(history 1 | sed "s/^[ ]*[0-9]\+[ ]*//" ) [$RETRN_VAL]"' /etc/rsyslog.config 파일에 다음사항 추가 "local6.* /var/log/cmdlog.log" rsyslog 재시작 cmdlog 확인

linux 2019. 4. 18. 17:58
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • [여행] warmfree
  • [재미] wowns
TAG
  • oracle linux8 kernel
  • vm rac
  • cmd로 계정 생성
  • cmd로 윈도우 계정 관리
  • dl20 g9 centos7 설치
  • ISCSI 볼륨 RAC
  • cgroup
  • dl20 centos7
  • windows.old 강제삭제
  • ipmi
  • 윈도우서버 계정 관려
  • centos7 ntp
  • kernel 변경
  • CentOS 7 GUI
  • 윈도우 cmd 계정 관리
  • ansible network
  • linux command log
  • ios ansible
  • nutanix rac
  • ansible ios
  • nxos ansible
  • chrony
  • 특정 라인삭제
  • 리눅스 커맨드 로그남기기
  • dl20
  • DL20 GEN9 장비에 CentOS 7
  • 특정 문구 치환
  • ILO
  • shell connmad log
  • cisco ansible
more
«   2025/05   »
일 월 화 수 목 금 토
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 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바