2012年1月12日 星期四
QNAP TS-412 自訂排程
ipkg install coreutils
2.編輯 /opt/var/cron/cron.allow 內容如下admin
3.加入排程工作 /opt/bin/crontab -e 內容範例如下
*/1 * * * * date >> /tmp/crontab.test
2012年1月5日 星期四
HD SUPPORT TOOLS
1.安裝 hdsupp.lrp
apkg -i hdsupp.lrp
dd if=/usr/sbin/mbr.bin of=/dev/sda bs=512 count=1
3.執行 syslinux 安裝 ldlinux.sys
syslinux /dev/sda1
2011年12月20日 星期二
QNAP TS-412 安裝 openssh
1.使用QPKG 外掛管理,安裝 Optware IPKG
2.安裝 openssh
ipkg update
ipkg install openssh
修改 /etc/init.d/Optware.sh,尋找以下內容
case "$1" in
start)
...[elided]...
# adding Ipkg apps into system path ...
/bin/cat /etc/profile /bin/grep "PATH" /bin/grep "/opt/bin" 1>>/dev/null 2>>/dev/null
[ $? -ne 0 ] && /bin/echo "export PATH=$PATH":/opt/bin:/opt/sbin >> /etc/profile
;;
stop)
改為
case "$1" in
start)
...[elided]...
# adding Ipkg apps into system path ...
/bin/cat /etc/profile /bin/grep "PATH" /bin/grep "/opt/bin" 1>>/dev/null 2>>/dev/null
[ $? -ne 0 ] && /bin/echo "export PATH=$PATH":/opt/bin:/opt/sbin >> /etc/profile
# Patch per http://wiki.qnap.com/wiki/Install_Optware_IPKG
/bin/echo "Run Optware/ipkg /opt/etc/init.d/*"
source /etc/profile
# Start all init scripts in /opt/etc/init.d
# executing them in numerical order.
#
for i in /opt/etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
#[ ! -f "$i" ] && continue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap - INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
# End patch
;;
stop)
2011年11月16日 星期三
PXELinux 設定範例
---------------------------------------------
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
/etc/dhcpd.conf
-------------------------------------------
ddns-update-style none;
ignore client-updates;
allow booting;
allow bootp;
subnet 192.168.56.0 netmask 255.255.255.0 {
range 192.168.56.10 192.168.56.20;
option broadcast-address 192.10.0.255;
option routers 192.168.56.1;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.19.10;
next-server 192.168.56.101;
filename "linux-install/gpxelinux.0";
}
/tftpboot/linux-install/pxelinux.cfg/default
--------------------------------------------
DEFAULT menu.c32
PROMPT 0
ALLOWOPTIONS 0
TIMEOUT 50
LABEL linux
MENU LABEL LINUX
KERNEL vmlinuz
append initrd=initrd.img
LABEL local
kernel chain.c32
append hd0 0
LABEL dos
MENU LABEL DOS
kernel memdisk
append initrd=dos.img
LABEL memtest
MENU LABEL MEMTEST
kernel memdisk
append iso initrd=memtest86+-4.20.iso
2011年11月3日 星期四
2011年10月25日 星期二
2011年9月14日 星期三
開啟 ZyXEL NSA 221 Telnet
2.啟用Web發行功能,將 public加入
3.啟用套件 PHP-MySQL-phpMyAdmin
4.編輯共用 public 勾選 將此共享發行至 Web
5.連線共用磁碟 net use * \\<ip>\public
新增檔案 getpasswd.php 內容如下
<?php
echo '<pre>
login:NsaRescueAngel
password:';
echo '</pre>';
?>
6.下列網址開啟 telnet 後門,帳號為:NsaRescueAngel
http://<ip>/zyxel/cgi-bin/remote_help-cgi?type=backdoor
7.下列網址取得密碼
http://<ip>/public/getpasswd.php