StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
2010年12月30日 星期四
2010年12月21日 星期二
2010年11月23日 星期二
ipmi management
enable ipmitool -> ipmitool lan set 1 access on
ipaddress setup -> ipmitool lan set 1 ipaddr 192.168.0.57
netmask setup -> ipmitool lan set 1 netmask 255.255.255.0
password setup -> ipmitool user set password 2
enable user account -> ipmitool user enable 3
verify password -> ipmitool user test 2 16 password
user channel privilege setup -> ipmitool channel setaccess 1 3 callin=on ipmi=on link=on privilege=4
enable sol payload for user -> ipmitool sol payload enable 1 3
ipmitool -H 192.168.0.68 -I lan -U root -P password sdr
ipmitool -H 192.168.0.68 -I lanplus -U root -P password sol activate
sel list|clear|info
ipaddress setup -> ipmitool lan set 1 ipaddr 192.168.0.57
netmask setup -> ipmitool lan set 1 netmask 255.255.255.0
password setup -> ipmitool user set password 2
enable user account -> ipmitool user enable 3
verify password -> ipmitool user test 2 16 password
user channel privilege setup -> ipmitool channel setaccess 1
enable sol payload for user -> ipmitool sol payload enable 1 3
ipmitool -H 192.168.0.68 -I lan -U root -P password sdr
ipmitool -H 192.168.0.68 -I lanplus -U root -P password sol activate
sel list|clear|info
2010年11月12日 星期五
Custom GPO
CLASS MACHINE
CATEGORY !!category
CATEGORY !!categoryname
POLICY !!Administractive_share_fix_Title
KEYNAME "Software\Microsoft\Windows\CurrentVersion\Policies\System"
#if version >= 4
SUPPORTED !!SUPPORTED_OS
#endif
#if version >= 3
EXPLAIN !!Administractive_share_fix_Help
#endif
VALUENAME "LocalAccountTokenFilterPolicy"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY
END CATEGORY
END CATEGORY
[strings]
category="Customized Policy Settings"
categoryname="Administractive Share Fix"
SUPPORTED_OS="Windows Vista, Windows 7"
Administractive_share_fix_Title="Enable Remote Access for Administractive Share"
Administractive_share_fix_Help="By default, remote administractive share access is not permitted.\nThis is a fix for allowing users who are under administrator group can access administractive share remotely."
ref: http://support.microsoft.com/kb/225087
有空再補一篇客製化工具
CATEGORY !!category
CATEGORY !!categoryname
POLICY !!Administractive_share_fix_Title
KEYNAME "Software\Microsoft\Windows\CurrentVersion\Policies\System"
#if version >= 4
SUPPORTED !!SUPPORTED_OS
#endif
#if version >= 3
EXPLAIN !!Administractive_share_fix_Help
#endif
VALUENAME "LocalAccountTokenFilterPolicy"
VALUEON NUMERIC 1
VALUEOFF NUMERIC 0
END POLICY
END CATEGORY
END CATEGORY
[strings]
category="Customized Policy Settings"
categoryname="Administractive Share Fix"
SUPPORTED_OS="Windows Vista, Windows 7"
Administractive_share_fix_Title="Enable Remote Access for Administractive Share"
Administractive_share_fix_Help="By default, remote administractive share access is not permitted.\nThis is a fix for allowing users who are under administrator group can access administractive share remotely."
ref: http://support.microsoft.com/kb/225087
有空再補一篇客製化工具
2010年11月11日 星期四
access windows 7 administractive folder
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
LocalAccountTokenFilterPolicy
REG_DWORD 1
reg add HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1
LocalAccountTokenFilterPolicy
REG_DWORD 1
reg add HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1
2010年10月25日 星期一
manuplate bash parameter
1:redefine IFS
2:rewind parameters
alias will not work in a shell script. using function is an alternate solution to redefine the command which you want to run.
ex:
Parent Process
#!/bin/sh
. /path_of_script/Child_Script
echo "This is a test mail"|mail -s "Test Mail" email@domain
Child Process
#!/bin/sh
function mail(){
myInput=""
for input in "$@"
do
input="${input/ /_}"
if [ "${input:0:1}" == "-" ] && [ "${input}" != "" ] ; then
myInput="${myInput}${input} "
else
myInput="${myInput}${input} "
fi
done
myInput="/usr/bin/mutt -F /tmp/demo/SignOffAdmin ${myInput}"
$myInput
}
please note double quote for $@ is a must
refer to http://www.ibm.com/developerworks/library/l-bash-parameters.html
2:rewind parameters
alias will not work in a shell script. using function is an alternate solution to redefine the command which you want to run.
ex:
Parent Process
#!/bin/sh
. /path_of_script/Child_Script
echo "This is a test mail"|mail -s "Test Mail" email@domain
Child Process
#!/bin/sh
function mail(){
myInput=""
for input in "$@"
do
input="${input/ /_}"
if [ "${input:0:1}" == "-" ] && [ "${input}" != "" ] ; then
myInput="${myInput}${input} "
else
myInput="${myInput}${input} "
fi
done
myInput="/usr/bin/mutt -F /tmp/demo/SignOffAdmin ${myInput}"
$myInput
}
please note double quote for $@ is a must
refer to http://www.ibm.com/developerworks/library/l-bash-parameters.html
訂閱:
文章 (Atom)