基本的には ようやく、振り出しに戻る の手順。
Dec 16 12:35:07 ls410d kernel: usb 1-1: new high-speed USB device number 2 using ehci_marvell Dec 16 12:35:07 ls410d kernel: scsi2 : usb-storage 1-1:1.0 Dec 16 12:35:08 ls410d kernel: scsi 2:0:0:0: Direct-Access ViPowER VP-89118(SD1) 2.10 PQ: 0 ANSI: 4 Dec 16 12:35:08 ls410d kernel: sd 2:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB) Dec 16 12:35:08 ls410d kernel: sd 2:0:0:0: [sdb] Write Protect is off Dec 16 12:35:08 ls410d kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0 Dec 16 12:35:08 ls410d kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 Dec 16 12:35:08 ls410d kernel: sdb: sdb1 sdb2 sdb3 sdb4 sdb5 sdb6 Dec 16 12:35:08 ls410d kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
root@ls410d:~# 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@ls410d:~# ls -l /dev/md* brw-rw---T 1 root disk 9, 124 12月 16 12:38 /dev/md124 brw-rw---T 1 root disk 9, 125 12月 16 12:38 /dev/md125 brw-rw---T 1 root disk 9, 126 12月 16 12:38 /dev/md126 brw-rw---T 1 root disk 9, 127 12月 16 12:38 /dev/md127 /dev/md: 合計 0 lrwxrwxrwx 1 root root 8 12月 16 12:38 0_0 -> ../md124 lrwxrwxrwx 1 root root 8 12月 16 12:38 LS-QVL-EMF42:1 -> ../md125 lrwxrwxrwx 1 root root 8 12月 16 12:38 LS-QVL-EMF42:10 -> ../md126 lrwxrwxrwx 1 root root 8 12月 16 12:38 LS-QVL-EMF42:21 -> ../md127 root@ls410d:~# mkdir /tmp/root root@ls410d:~# mount /dev/md125 /tmp/root root@ls410d:~# ls /tmp/root bin dev home lib mnt resources sbin tmp var boot etc initrd lost+found proc root sys usr www root@ls410d:~#
root@ls410d:~# cd /tmp/root/etc/ root@ls410d:/tmp/root/etc# vi shadow : : root@ls410d:/tmp/root/etc# grep '^root' shadow root::11009:0:99999:7::: root@ls410d:/tmp/root/etc#
root@ls410d:/tmp/root/etc# mv sshd_config{,.orig}
root@ls410d:/tmp/root/etc# cp sshd_config{.orig,}
root@ls410d:/tmp/root/etc# ls /mnt/share
sshd_config.diff
root@ls410d:/tmp/root/etc# patch < /mnt/share/sshd_config.diff
patching file sshd_config
root@ls410d:/tmp/root/etc# !cp:s/cp/diff -u/
diff -u sshd_config{.orig,}
--- sshd_config.orig    2011-01-06 11:07:39.000000000 +0900
+++ sshd_config 2013-12-16 12:41:22.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@ls410d:/tmp/root/etc#
root@ls410d:/tmp/root/etc# cd / root@ls410d:/# umount /tmp/root root@ls410d:/#
root@LS-QVLF42:~#Good Going!
| 
 | 
| ← ファームウェア 1.68 へのアップデート | ハックの記録 LinkStation/玄箱 をハックしよう | → 散歩 | 
Copyright (C) 2003-2013 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市