「最初」の一歩は、標準ファームの HDD のコピーなのだが、
標準ファームの HDD を温存する必要がなくなったので、パスして
SSH でログインできるようにするところから。
yasunari@qube:~$ ssh -l admin qvl Password: Connection to qvl closed by remote host. Connection to qvl closed. yasunari@qube:~$もちろんログインはできないが、 sshd 自体は動作している。
しかし、何のために動かしてあるの??
Jun 16 14:59:53 vl kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2 Jun 16 14:59:53 vl kernel: usb 1-1: configuration #1 chosen from 1 choice Jun 16 14:59:53 vl kernel: scsi2 : SCSI emulation for USB Mass Storage devices Jun 16 14:59:58 vl kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Jun 16 14:59:58 vl kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 Jun 16 14:59:58 vl kernel: sd 2:0:0:0: [sdb] 488283264 512-byte logical blocks: (250 GB/232 GiB) Jun 16 14:59:58 vl kernel: sd 2:0:0:0: [sdb] Write Protect is off Jun 16 14:59:58 vl kernel: sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 Jun 16 14:59:58 vl kernel: sd 2:0:0:0: [sdb] Attached SCSI diskん?今度はマウントされない。
root@vl:~# mdadm --assemble /dev/md1 root@vl:~# mkdir /tmp/root root@vl:~# mount /dev/md1 /tmp/root mount: special device /dev/md1 does not exist root@vl:~#あれ?いつもと違う、、、
md をスキャンする。
root@vl:~# mdadm --assemble -scan
mdadm: /dev/md/LS-QVL-EMF42:21 has been started with 1 drive (out of 2).
mdadm: /dev/md/LS-QVL-EMF42:10 has been started with 1 drive (out of 4).
mdadm: /dev/md/LS-QVL-EMF42:1 has been started with 1 drive (out of 4).
mdadm: /dev/md/0_0 has been started with 1 drive (out of 4).
root@vl:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4]
md124 : active raid1 sdb1[0]
1000384 blocks [4/1] [U___]
md125 : active raid1 sdb2[0]
4999156 blocks super 1.2 [4/1] [U___]
md126 : active raid1 sdb5[0]
1000436 blocks super 1.2 [4/1] [U___]
md127 : active raid1 sdb6[0]
229327736 blocks super 1.2 [2/1] [U_]
unused devices:
root@vl:~# ls -l /dev/md*
brw-rw---- 1 root disk 9, 124 2012-06-16 15:02 /dev/md124
brw-rw---- 1 root disk 9, 125 2012-06-16 15:02 /dev/md125
brw-rw---- 1 root disk 9, 126 2012-06-16 15:02 /dev/md126
brw-rw---- 1 root disk 9, 127 2012-06-16 15:02 /dev/md127
/dev/md:
合計 0
lrwxrwxrwx 1 root root 8 2012-06-16 15:02 0_0 -> ../md124
lrwxrwxrwx 1 root root 8 2012-06-16 15:02 LS-QVL-EMF42:1 -> ../md125
lrwxrwxrwx 1 root root 8 2012-06-16 15:02 LS-QVL-EMF42:10 -> ../md126
lrwxrwxrwx 1 root root 8 2012-06-16 15:02 LS-QVL-EMF42:21 -> ../md127
root@vl:~#
うーん。RAID はよくわからない。
今度こそマウントする
root@vl:~# mount /dev/md125 /tmp/root root@vl:~# ls /tmp/root bin dev home lib mnt root sys usr www boot etc initrd lost+found proc sbin tmp var root@vl:~#
root@vl:~# cd /tmp/root/etc/ root@vl:/tmp/root/etc# vi shadow : : root@vl:/tmp/root/etc# grep root !$ grep root shadow root::11009:0:99999:7::: root@vl:/tmp/root/etc#
root@vl:/tmp/root/etc# mv sshd_config{,.orig}
root@vl:/tmp/root/etc# cp sshd_config.orig sshd_config
root@vl:/tmp/root/etc# vi sshd_config
:
:
root@vl:/tmp/root/etc# !cp:s/cp/diff -u/
diff -u sshd_config.orig sshd_config
--- sshd_config.orig 2011-01-06 11:07:39.000000000 +0900
+++ sshd_config 2012-06-16 15:08:11.000000000 +0900
@@ -20,7 +20,7 @@
# HostKeys for protocol version 2
#HostKey /etc/ssh_host_rsa_key
#HostKey /etc/ssh_host_dsa_key
-HostKey /etc/apache/server.key
+#HostKey /etc/apache/server.key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
@@ -34,8 +34,8 @@
# Authentication:
#LoginGraceTime 2m
-#PermitRootLogin yes
-PermitRootLogin no
+PermitRootLogin yes
+#PermitRootLogin no
#StrictModes yes
#RSAAuthentication yes
@@ -55,6 +55,7 @@
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
+PermitEmptyPasswords yes
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
@@ -71,7 +72,8 @@
# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
-UsePAM yes
+#UsePAM yes
+UsePAM no
#AllowTcpForwarding yes
#GatewayPorts no
root@vl:/tmp/root/etc#
root@vl:/tmp/root/etc# cd / root@vl:/# umount /tmp/root/ root@vl:/#
yasunari@qube:~$ ssh -l root qvl The authenticity of host 'qvl (192.168.2.56)' can't be established. RSA key fingerprint is 1b:5d:c8:9d:01:de:f0:eb:22:65:5c:55:13:90:31:52. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'qvl,192.168.2.56' (RSA) to the list of known hosts. root@LS-QVLF42:~#OK!
|
|
← トラブルシュート(10)tftp boot ? (7) |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ ファームウェア 1.57 の散歩 |
Copyright (C) 2003-2012 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市