- To collect the system information data.
racadm supportassist collect -t Sysinfo
- To collect the filtered data.
racadm supportassist collect -t Debug –filter
- To collect the data and export to a NFS network share:
racadm supportassist collect -t SysInfo,TTYLog -l 10.94.161.103:/supportassist_share
- To collect the data and upload to the Dell support assist server.
racadm supportassist collect -t Sysinfo -upload
- To collect the data and export to a local share. This is allowed only from a remote or a local RACADM.
racadm supportassist collect -t ttylog -f tsr.zip
- To collect the data and export to a remote share as well as to the Dell support assist server.
racadm supportassist collect -t Debug -l //192.168.10.24/share -u myuser -p mypass -upload
- To export the last collected SupportAssist data, to a CIFS share
racadm supportassist exportlastcollection -l //192.168.10.24/share -u myuser -p mypass
- To export the collected SupportAssist data to a CIFS or NFS share. The default share details must be updated for this command to work.
racadm supportassist exportlastcollection
- To accept the End User License Agreement (EULA).
racadm supportassist accepteula
- To check the End User License Agreement (EULA) status.
racadm supportassist geteulastatus
- To register the iDRAC for SupportAssist features.
racadm supportassist register -pfname micheal -plname dell -pmnumber 9999988888 -panumber 8888899999 -pmailid micheal_dell@dell.com -sfname sourav -slname ganguly -smnumber 9999977777 -sanumber 7777799999 -smailid sourav_ganguly@dell.com -company dell -street1 bagmanetechpark -street2 cvramannagar -city bangalore -state karnataka -country india -zip 560093
- To upload the last collection to the Dell SupportAssist server.
racadm supportassist uploadlastcollection
- To expose the iSM installer to the host OS for the iSM installation.
racadm supportassist exposeisminstallertohostos
- To Schedule auto collection of SupportAssist data weekly.
racadm supportassist autocollectscheduler create -time 4:05am -dow sunday -rp weekly
- To schedule auto collection of the SupportAssist data monthly.
racadm supportassist autocollectscheduler create -time 7:55pm -dom 20 -rp monthly
- To schedule auto collection of the SupportAssist data quarterly.
racadm supportassist autocollectscheduler create -time 7:55am -wom 2 -dow monday -rp quarterly
- To view the auto collection data.
racadm supportassist autocollectscheduler view
- To clear the auto collection data.
racadm supportassist autocollectscheduler clear
2020년 8월 31일 월요일
tsr log linux
2020년 8월 28일 금요일
Change IP of iDRAC from linux
If you install OpenManage onto the host, you can apply an IP address to the iDRAC that way. OpenManage would provide a graphical tool, but if this is a headless install, it would also provide the racadm command set.
racadm setniccfg -s <IPv4 address> <Subnet> <IPv4 Gateway>
2020년 6월 4일 목요일
How to use racadm to get raid rebuild percentage?
OpenManage CLI command. There is a CLI guid on the OpenManage Server Administrator support page. The command would be something like this:
omreport storage pdisk controller=0
linux 에서 tsr log 수집 방법
2019년 4월 9일 화요일
Fixing Postfix permission issues on Linux
If you are receiving a message similar to…
Jan 15 22:12:36 ip-10-0-0-133 postfix/postdrop[8301]:warning: mail_queue_enter: create file maildrop/939392.8301: Permission denied
Jan 15 22:12:37 ip-10-0-0-133 postfix/postdrop[8302]:warning: mail_queue_enter: create file maildrop/8821.8302: Permission denied
Jan 15 22:12:37 ip-10-0-0-133 postfix/postdrop[8303]:warning: mail_queue_enter: create file maildrop/14290.8303: Permission denied
You probably have a permission issue with your Postfix installation. This is usually caused by a bad upgrade or maybe user error when moving or recovering mail folders.
This can easily be solved by running the following commands below as root.
/etc/init.d/postfix stop
killall -9 postdrop
chgrp -R postdrop /var/spool/postfix/public
chgrp -R postdrop /var/spool/postfix/maildrop
/usr/sbin/postfix set-permissions
postfix check
/etc/init.d/postfix start
This should work on just about any Linux distro.
2017년 7월 4일 화요일
scsi disk 삭제 방법
rhel 기준이며 잘안될때는 재기동이 짱입니다 ㅠㅠ
Procedure 1. Ensuring a Clean Device Removal
Close all users of the device and backup device data as needed.
Use umount to unmount any file systems that mounted the device.
Remove the device from any md and LVM volume using it. If the device is a member of an LVM Volume group, then it may be necessary to move data off the device using the pvmove command, then use the vgreducecommand to remove the physical volume, and (optionally) pvremove to remove the LVM metadata from the disk.
If the device uses multipathing, run multipath -l and note all the paths to the device. Afterwards, remove the multipathed device using multipath -f device.
Run blockdev –flushbufs device to flush any outstanding I/O to all paths to the device. This is particularly important for raw devices, where there is no umount or vgreduce operation to cause an I/O flush.
Remove any reference to the device's path-based name, like /dev/sd, /dev/disk/by-path or the major:minor number, in applications, scripts, or utilities on the system. This is important in ensuring that different devices added in the future will not be mistaken for the current device.
Finally, remove each path to the device from the SCSI subsystem. To do so, use the command echo 1 > /sys/block/device-name/device/delete where device-name may be sde, for example.
Another variation of this operation is echo 1 > /sys/class/scsi_device/h:c:t:l/device/delete, where h is the HBA number, c is the channel on the HBA, t is the SCSI target ID, and l is the LUN.
2017년 6월 9일 금요일
[보안] 리눅스 패스워스 사용정책
centos rhel
패스워드 사용 정책에 관한 포스팅을 하겠습니다.
주요 파일은 /etc/login.defs , /etc/pam.d/common-password 입니다.
오늘 포스팅 주제에 관해서는 제 환경이 우분투이라는 점입니다.
오늘 다룰 주제에서 레드헷 계열과는 조금 다른점이 있어서 이점 양해바랍니다.
유저가 접속 할때 ID/PW 를 입력하여 접속을 시도합니다.
모든 사용자가 거처야할 필수 코스죠
가장 기본적인 코스인 만큼 그에 대한 정책은 제각각입니다.
그중 가장 기본적인 세가지의 설정에 대해서 언급하겠습니다.
패스워드 최소길이 (PASS_MIN_LEN)
최대 사용기간(PASS_MAX_DAYS)
최소 사용기간(PASS_MIN_DAYS)
이렇게 있습니다. 정해져있는 값은 없습니다.
PASS_MIN_LEN 8 (자리)
PASS_MAX_DAYS 60 (일)
PASS_MIN_DAYS 7 (일)
위와 같은 설정으로 잡겠습니다.
패스워드 정책에 대해서는 위와 같은 설정 파일을 설정해주는 방법과
각 기관에 따른 정책(ex. 패스워드의 영문/숫자/특수문자 조합 및 길이) 두가지로 나뉠수 있습니다.
아래 그림을 보시면 주석(#)이 아닌 세개의 줄을 보실수 있습니다.
위의 2개는 앞서 설명드렸고, PASS_WARN_AGE는 암호 만료일 지정시 만료전 경고를 보여주기 시작하는 일 수 입니다.
]# vi /etc/login.defs
명령어를 사용하여 아래의 숫자를 원하는 수로 변경해주시면 됩니다.
[ 그림 1 - /etc/login.defs 설정 파일 일부분 ]
PASS_MIN_LEN의 경우 앞서 말씀드린것과 같이 우분투 계열은 다른 설정 파일에 존재합니다.
기본적으로 대부분 아래 그림과 같이 설정되어 있을겁니다. 빨간부분 중간에 그림 3과 같이 입력해 주시면 됩니다.
[ 그림 2 - /etc/pam.d/common-password /설정 파일 일부분(수정 전) ]
아래 그림처럼 min=8 을 입력해주시면 8자리 이상의 패스워드를 입력하셔야 합니다.
[ 그림 3 - /etc/pam.d/common-password /설정 파일 일부분(수정 후) ]
그럼 위를 토대로 스크립트를 작성하겠습니다.
#!/bin/bash
PASSWD_CONF=/etc/login.defs
PASSWD_LEN=/etc/pam.d/common-password
echo "########## 1. 계정관리 - 1.4 패스워드 사용규칙 적용 ######################"
### 항목구분 ###
echo " 1. 계정관리"
### 항목명 ###
echo " 1.4 패스워드 사용규칙 적용"
### 위험도 ###
echo " 위험도 : 상"
### 기준설명 ###
echo " [기준]"
echo " 가. 패스워드 사용규칙 설정 "
echo " 패스워드 최소길이, 최대 사용기간, 최소 사용기간, 계정잠금 임계값 설정"
echo " # vi /etc/login.defs를 실행하여 아래와 같은 설정 적용 (단위: 일)"
echo " PASS_MIN_LEN 8"
echo " PASS_MAX_DAYS 60"
echo " PASS_MIN_DAYS 7"
echo " Ubuntu의 경우 길이제한 부분은 # vi /etc/pam.d/common-password를 실행하여 아래와 같은 설정을 적용"
echo " (수정 전) password [success=1 default=ignore] pam_unix.so obscure sha512"
echo " (수정 후) password [success=1 default=ignore] pam_unix.so obscure min=8 sha512"
echo " 나. 패스워드 설정"
echo " 문자/숫자/특수문자의 2종류 조합으로 8자리 이상, 3종류으로 10자리 이상"
echo "※ 가, 나 항목 모두 적용 해야 함"
### 현재설정 ###
echo "/etc/login.defs 설정 확인 "
if [ `cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_LEN' | awk '{if ($2 < 8) print $0}' | wc -l` -eq 1 ]
then
echo ">>취약: 패스워드 최소길이가 8보다 작게 설정되어 있습니다."
cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_LEN' | awk '{if ($2 < 8) print $0}'
else
echo ">>양호: 패스워드 최소길이가 8 이상으로 설정되어 있습니다."
fi
if [ `cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MAX_DAYS' | awk '{if ($2 > 70) print $0}' | wc -l` -eq 1 ]
then
echo ">>취약: 패스워드 최대 사용기간이 70일보다 크게 설정되어 있습니다."
cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MAX_DAYS' | awk '{if ($2 > 70) print $0}'
else
echo ">>양호: 패스워드 최대 사용기간이 70일 이하로 설정되어 있습니다."
fi
if [ `cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_DAYS' | awk '{if ($2 < 7) print $0}' | wc -l` -eq 1 ]
then
echo ">>취약: 패스워드 최소 사용기간이 7일보다 작게 설정되어 있습니다."
cat $PASSWD_CONF | grep -v "^#" | grep 'PASS_MIN_DAYS' | awk '{if ($2 < 7) print $0}'
else
echo ">>양호: 패스워드 최소 사용기간이 7일 이상으로 설정되어 있습니다."
fi
echo "/etc/pam.d/common-password 설정 확인 "
if [ `cat $PASSWD_LEN | grep -v "^#" | grep 'min' | wc -l` -eq 1 ]
then
echo "양호 : 패스워드 최소 길이가 설정되어 있습니다."
cat $PASSWD_LEN | grep -v "^#" | grep 'min'
else
echo " 취약 : 패스워드 최소 길이가 설정되어 있지않습니다."
fi
위와 같은 방법으로 하시면 됩니다.
이번 스크립트의 경우, 경우의 수가 많기 때문에 각자에 맞게 변형해주시면 될것같습니다.
이상으로 마치겠습니다.