LS-GL に第三世代 LinkStation ハックキット

Debian LS-GL

LS-QL をハックするでもなく、
LS-XHL の initrd をハックするでもなく、
なぜか LS-GL に 第三世代 LinkStation ハックキット をインストールする。謎

インストール先は、 先日玉突き交換で取り出した SEAGETE ST3320620AS 。
これって問題ない物?

準備(LS-WSGL 以外 の場合)

標準ファームに root でログインできるようにします

標準ファームで起動

ハックキットのファイルを置きます

インストール

ログイン


BUFFALO INC. LinkStation series LS-GL(IESADA)
LS-GL530 login: root
root@LS-GL530:~#

時計を合わせる

root@LS-GL530:~# date
Fri Jan 23 22:10:43 JST 2009
root@LS-GL530:~#
LS-GL はバッテリバックアップされているので 合わせなくてもよい。

インストールする HDD の準備(LS-WSGL 以外)

インストールする HDD を USB で接続。
Jan 23 22:13:04 LS-GL530 kernel: usb 2-1: new high speed USB device using ehci_platform and address 2
Jan 23 22:13:04 LS-GL530 kernel: usb 2-1: configuration #1 chosen from 1 choice
Jan 23 22:13:04 LS-GL530 kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jan 23 22:13:09 LS-GL530 kernel:   Vendor: ST332062  Model:         9QF0NVQ5  Rev: D
Jan 23 22:13:09 LS-GL530 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Jan 23 22:13:09 LS-GL530 kernel: SCSI device sdb: 625142448 512-byte hdwr sectors (320073 MB)
Jan 23 22:13:09 LS-GL530 kernel: sdb: Write Protect is off
Jan 23 22:13:09 LS-GL530 kernel: sdb: assuming drive cache: write through
Jan 23 22:13:09 LS-GL530 kernel: SCSI device sdb: 625142448 512-byte hdwr sectors (320073 MB)
Jan 23 22:13:09 LS-GL530 kernel: sdb: Write Protect is off
Jan 23 22:13:09 LS-GL530 kernel: sdb: assuming drive cache: write through
Jan 23 22:13:09 LS-GL530 kernel:  sdb: sdb1 sdb2 sdb3 sdb4
Jan 23 22:13:09 LS-GL530 kernel: sd 2:0:0:0: Attached scsi disk sdb
Jan 23 22:13:09 LS-GL530 kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
なぜか、自動マウントはされなかった。

先日まで HS-DHGL でハック de 録!! が動いていた HDD なので、 既にパーティションが切ってある。

root@LS-GL530:~# fdisk -l /dev/sdb

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          25      200781   83  Linux
/dev/sdb2              26         275     2008125   83  Linux
/dev/sdb3             276         307      257040   82  Linux swap
/dev/sdb4             308       38913   310102695   83  Linux
root@LS-GL530:~#

カスタマイズ

旧型 LS-GL 向けにカスタマイズする。
root@LS-GL530:~# cd /mnt/disk1/share/hackkit/
root@LS-GL530:/mnt/disk1/share/hackkit# mv hackkit_081214.sh{,.orig}
root@LS-GL530:/mnt/disk1/share/hackkit# cp hackkit_081214.sh{.orig,}
root@LS-GL530:/mnt/disk1/share/hackkit# vi hackkit_081214.sh
	:
root@LS-GL530:/mnt/disk1/share/hackkit# diff -c hackkit_081214.sh.orig hackkit_081214.sh
*** hackkit_081214.sh.orig      Sun Dec 14 19:37:16 2008
--- hackkit_081214.sh   Fri Jan 23 22:20:22 2009
***************
*** 4,16 ****
  # Copyright (C) Yasunari YAMASHITA. All Rights Reserved.
  #

! ADDRESS=192.168.2.47
  NETWORK=192.168.2.0
  NETMASK=255.255.255.0
  BROADCAST=192.168.2.255
  GATEWAY=192.168.2.1
  NAMESERVER=192.168.1.2
! HOSTNAME=hackkit

  WORK=/mnt/disk1/share/hackkit
  HACKKIT=$WORK/hackkit_081209.tar.gz
--- 4,16 ----
  # Copyright (C) Yasunari YAMASHITA. All Rights Reserved.
  #

! ADDRESS=192.168.2.38
  NETWORK=192.168.2.0
  NETMASK=255.255.255.0
  BROADCAST=192.168.2.255
  GATEWAY=192.168.2.1
  NAMESERVER=192.168.1.2
! HOSTNAME=ude

  WORK=/mnt/disk1/share/hackkit
  HACKKIT=$WORK/hackkit_081209.tar.gz
root@LS-GL530:/mnt/disk1/share/hackkit#

インストーラの実行

root@LS-GL530:/mnt/disk1/share/hackkit# cd /mnt/disk1/share/hackkit
root@LS-GL530:/mnt/disk1/share/hackkit# sh hackkit_081214.sh
PRODUCTID = 0x00000009
formating hard drive ...
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
50200 inodes, 200781 blocks
10039 blocks (5.00%) reserved for the super user
First data block=1
25 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
meta-data=/dev/sdb2              isize=256    agcount=8, agsize=62754 blks
         =                       sectsz=512
data     =                       bsize=4096   blocks=502031, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=2560, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0
Setting up swapspace version 1, size = 263204864 bytes
meta-data=/dev/sdb4              isize=256    agcount=74, agsize=1048576 blks
         =                       sectsz=512
data     =                       bsize=4096   blocks=77525673, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=32768, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0
mounting root file system ...
extracting hackkit archive ...
./
./var/
./var/lib/
./var/lib/apt/
./var/lib/apt/lists/
	:
	:
./sbin/xfs_repair
./tmp/
./sys/
./selinux/
./srv/
./opt/
./media/
./initrd/
copying miconapl ...
usr/local/sbin/miconapl
usr/local/lib/libbuffalo_bin.so
creating miconapl ...
creating fancontrol ...
creating kernelmon ...
copying /lib/modules ...
lib/modules/
lib/modules/2.6.16.16-arm1/
lib/modules/2.6.16.16-arm1/kernel/
lib/modules/2.6.16.16-arm1/kernel/fs/
	:
	:
lib/modules/2.6.16.16-arm1/modules.symbols
creating usb ...
checking /dev/sdb1
fsck 1.27 (8-Mar-2002)
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: 11/50200 files (0.0% non-contiguous), 10465/200781 blocks
mounting /boot ...
copying /boot ...
initrd.buffalo
uImage.buffalo
editing initrd ...
75826+1 records in
75826+1 records out
gunziping /mnt/debinst/boot/initrd.gz ...
gziping /mnt/debinst/boot/initrd ... wait 5 minutes
Image Name:   initrd
Created:      Fri Jan 23 22:26:17 2009
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    4835943 Bytes = 4722.60 kB = 4.61 MB
Load Address: 0x00000000
Entry Point:  0x00000000
unmount /boot ...
umount: /mnt/debinst/boot: device is busy
umount: /mnt/debinst/boot: device is busy
root@LS-GL530:/mnt/disk1/share/hackkit#
ここで電源 OFF であるが、、、

最初の設定

最初の設定を HDD を標準ファームにつないだままで実行する。
そのために、まずは /tmp/root にマウント
root@LS-GL530:/mnt/disk1/share/hackkit# mkdir /tmp/root
mkdir: Cannot create directory `/tmp/root': File exists
root@LS-GL530:/mnt/disk1/share/hackkit# mount /dev/sdb2 /tmp/root
root@LS-GL530:/mnt/disk1/share/hackkit#

root のパスワード変更

各設定は、/tmp/root に chroot して行う。
root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@LS-GL530:/mnt/disk1/share/hackkit#

一般ユーザの作成

root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root groupadd yamasita
root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root mkdir /home/yamasita
root@LS-GL530:/mnt/disk1/share/hackkit# hroot /tmp/root useradd -g yamasita -d /home/yamasita/yasunari yasunari
root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root passwd yasunari
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root userdel guest
root@LS-GL530:/mnt/disk1/share/hackkit#

guest の削除

root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root userdel guest
root@LS-GL530:/mnt/disk1/share/hackkit#

パッケージのアップデート

root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root apt-get update
Get:1 http://security.debian.org lenny/updates Release.gpg [189B]
Get:2 http://security.debian.org lenny/updates Release [40.8kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:3 http://ftp.jp.debian.org lenny Release.gpg [189B]
Get:4 http://security.debian.org lenny/updates/main Packages [14.8kB]
Get:5 http://ftp.jp.debian.org lenny Release [74.5kB]
Get:6 http://security.debian.org lenny/updates/main Sources [6457B]
Get:7 http://ftp.jp.debian.org lenny/main Packages/DiffIndex [1760B]
Get:8 http://ftp.jp.debian.org lenny/main Sources/DiffIndex [1760B]
Get:9 http://ftp.jp.debian.org lenny/main Packages [6719kB]
Get:10 http://ftp.jp.debian.org lenny/main Sources [2980kB]
Fetched 9839kB in 43s (227kB/s)
Reading package lists... Done
root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  apt apt-utils aptitude base-files dpkg ed gcc-4.2-base gcc-4.3-base libc6
  libgcc1 libgnutls26 libncurses5 libncursesw5 libpam-modules libpam-runtime
  libpam0g libssl0.9.8 libstdc++6 locales ncurses-base ncurses-bin
  openbsd-inetd perl-base procps rsyslog
25 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.5MB of archives.
After this operation, 565kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main base-files 5 [62.1kB]
Get:2 http://ftp.jp.debian.org lenny/main dpkg 1.14.24 [2349kB]
Get:3 http://ftp.jp.debian.org lenny/main ncurses-bin 5.7+20081213-1 [303kB]
Get:4 http://ftp.jp.debian.org lenny/main perl-base 5.10.0-19 [965kB]
Get:5 http://ftp.jp.debian.org lenny/main gcc-4.3-base 4.3.2-1.1 [104kB]
Get:6 http://ftp.jp.debian.org lenny/main libgcc1 1:4.3.2-1.1 [23.6kB]
Get:7 http://ftp.jp.debian.org lenny/main libstdc++6 4.3.2-1.1 [268kB]
Get:8 http://ftp.jp.debian.org lenny/main libc6 2.7-18 [4842kB]
Get:9 http://ftp.jp.debian.org lenny/main libncurses5 5.7+20081213-1 [328kB]
Get:10 http://ftp.jp.debian.org lenny/main ncurses-base 5.7+20081213-1 [178kB]
Get:11 http://ftp.jp.debian.org lenny/main libpam-modules 1.0.1-5 [286kB]
Get:12 http://ftp.jp.debian.org lenny/main apt 0.7.20 [1605kB]
Get:13 http://ftp.jp.debian.org lenny/main libpam-runtime 1.0.1-5 [166kB]
Get:14 http://ftp.jp.debian.org lenny/main libpam0g 1.0.1-5 [103kB]
Get:15 http://ftp.jp.debian.org lenny/main apt-utils 0.7.20 [182kB]
Get:16 http://ftp.jp.debian.org lenny/main libncursesw5 5.7+20081213-1 [348kB]
Get:17 http://ftp.jp.debian.org lenny/main aptitude 0.4.11.11-1~lenny1 [2989kB]
Get:18 http://ftp.jp.debian.org lenny/main ed 0.7-3 [48.3kB]
Get:19 http://ftp.jp.debian.org lenny/main libgnutls26 2.4.2-4 [453kB]
Get:20 http://ftp.jp.debian.org lenny/main libssl0.9.8 0.9.8g-15 [851kB]
Get:21 http://ftp.jp.debian.org lenny/main rsyslog 3.18.6-3 [167kB]
Get:22 http://ftp.jp.debian.org lenny/main gcc-4.2-base 4.2.4-5 [99.1kB]
Get:23 http://ftp.jp.debian.org lenny/main procps 1:3.2.7-11 [250kB]
Get:24 http://ftp.jp.debian.org lenny/main locales 2.7-18 [4492kB]
Get:25 http://ftp.jp.debian.org lenny/main openbsd-inetd 0.20080125-2 [33.3kB]
Fetched 21.5MB in 49s (433kB/s)
Preconfiguring packages ...
(Reading database ... 8599 files and directories currently installed.)
Preparing to replace base-files 4.0.6 (using .../base-files_5_armel.deb) ...
Unpacking replacement base-files ...
rm: cannot remove `/var/lib/dpkg/tmp.ci/control': Function not implemented
dpkg: error while cleaning up:
 subprocess rm cleanup returned error exit status 1
Processing triggers for man-db ...
Setting up base-files (5) ...
Installing new version of config file /etc/debian_version ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
rm: cannot remove `/var/lib/dpkg/tmp.ci/control': Function not implemented
dpkg: error processing /var/cache/apt/archives/dpkg_1.14.24_armel.deb (--unpack):
 subprocess rm cleanup returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/dpkg_1.14.24_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@LS-GL530:/mnt/disk1/share/hackkit#
あかんか。
root@LS-GL530:/mnt/disk1/share/hackkit# chroot /tmp/root
sh-3.2# apt-get update
Hit http://security.debian.org lenny/updates Release.gpg
Hit http://ftp.jp.debian.org lenny Release.gpg
Hit http://security.debian.org lenny/updates Release
Hit http://ftp.jp.debian.org lenny Release
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Hit http://ftp.jp.debian.org lenny/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Hit http://security.debian.org lenny/updates/main Packages
Hit http://ftp.jp.debian.org lenny/main Sources/DiffIndex
Hit http://security.debian.org lenny/updates/main Sources
Reading package lists... Done
sh-3.2# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  apt apt-utils aptitude dpkg ed gcc-4.2-base gcc-4.3-base libc6 libgcc1
  libgnutls26 libncurses5 libncursesw5 libpam-modules libpam-runtime libpam0g
  libssl0.9.8 libstdc++6 locales ncurses-base ncurses-bin openbsd-inetd
  perl-base procps rsyslog
24 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/21.4MB of archives.
After this operation, 565kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
rm: cannot remove `/var/lib/dpkg/tmp.ci/control': Function not implemented
dpkg: error processing /var/cache/apt/archives/dpkg_1.14.24_armel.deb (--unpack):
 subprocess rm cleanup returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/dpkg_1.14.24_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sh-3.2#
うーん。apt-get はうまくいかんみたい。
ジェイルを抜け、アンマウントする。
sh-3.2# exit
exit
root@LS-GL530:/mnt/disk1/share/hackkit# umount /tmp/root
root@LS-GL530:/mnt/disk1/share/hackkit#

インストールし直し

エラーが発生した汚いまま進めるのは問題が起きる原因なので、 インストールスクリプトをもう一回実行。

電源 OFF

ハックキットで起動

SATA で接続している標準ファームの HDD をはずし、 USB で接続していたハックキットの HDD を SATA で接続。
電源を ON にする。

旧型 LS-GL は HDD 交換が面倒(藁)

最初の設定

ログイン

Debian GNU/Linux lenny/sid
ude login: guest
Password:
Linux ude 2.6.16.16-arm1 #37 Tue May 20 10:01:57 JST 2008 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No directory, logging in with HOME=/
guest@ude:/$

root になる

guest@ude:/$ su - root
Password:
ude:~#

時計を合わせる

ude:~# date
Sat Jan 24 06:32:10 JST 2009
ude:~#
必要なし。

できるところは、どんどんスクリプトにする。
root のパスワード変更以降、 時刻同期から Windows 向けファイルサーバまで、 ログインしているユーザを削除する以外はスクリプトにできるかな。

ude:~# cat setup_090124.sh
#!/bin/sh

passwd root
addgroup --gid 1001 yamasita
adduser --home /home/yamasita/yasunari --ingroup yamasita --uid 1001 --gecos "Yasunari Yamashita" yasunari

# deluser guest

apt-get update
apt-get upgrade

apt-get install ntp

apt-get install samba
(
echo
echo '[share]'
echo '  comment = hackkit share'
echo '  path = /mnt'
echo '  writable = Yes'
echo '  create mask = 0660'
echo '  directory mask = 0770'
) >> /etc/samba/smb.conf
/etc/init.d/samba reload

smbpasswd -a yasunari
mkdir /mnt/share
chgrp yamasita /mnt/share/
chmod g+w /mnt/share

apt-get clean
ude:~#
ntp.conf の編集もスクリプトでやってしまいたいが、 sed で複数行の追加ってどうするんやったかな。

実行する。

ude:~# sh setup_090124.sh
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Adding group `yamasita' (GID 1001) ...
Done.
Adding user `yasunari' ...
Adding new user `yasunari' (1001) with group `yamasita' ...
Creating home directory `/home/yamasita/yasunari' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Get:1 http://ftp.jp.debian.org lenny Release.gpg [189B]
Get:2 http://security.debian.org lenny/updates Release.gpg [189B]
Get:3 http://ftp.jp.debian.org lenny Release [74.5kB]
Get:4 http://security.debian.org lenny/updates Release [40.8kB]
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Get:5 http://security.debian.org lenny/updates/main Packages [14.8kB]
Get:6 http://ftp.jp.debian.org lenny/main Packages/DiffIndex [1899B]
Get:7 http://security.debian.org lenny/updates/main Sources [6457B]
Get:8 http://ftp.jp.debian.org lenny/main Sources/DiffIndex [1899B]
Get:9 http://ftp.jp.debian.org lenny/main Packages [6719kB]
Get:10 http://ftp.jp.debian.org lenny/main Sources [2980kB]
Fetched 9839kB in 39s (250kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  apt apt-utils aptitude base-files dpkg ed gcc-4.2-base gcc-4.3-base libc6
  libgcc1 libgnutls26 libncurses5 libncursesw5 libpam-modules libpam-runtime
  libpam0g libssl0.9.8 libstdc++6 locales ncurses-base ncurses-bin
  openbsd-inetd perl-base procps rsyslog
25 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.5MB of archives.
After this operation, 565kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main base-files 5 [62.1kB]
Get:2 http://ftp.jp.debian.org lenny/main dpkg 1.14.24 [2349kB]
Get:3 http://ftp.jp.debian.org lenny/main ncurses-bin 5.7+20081213-1 [303kB]
Get:4 http://ftp.jp.debian.org lenny/main perl-base 5.10.0-19 [965kB]
Get:5 http://ftp.jp.debian.org lenny/main gcc-4.3-base 4.3.2-1.1 [104kB]
Get:6 http://ftp.jp.debian.org lenny/main libgcc1 1:4.3.2-1.1 [23.6kB]
Get:7 http://ftp.jp.debian.org lenny/main libstdc++6 4.3.2-1.1 [268kB]
Get:8 http://ftp.jp.debian.org lenny/main libc6 2.7-18 [4842kB]
Get:9 http://ftp.jp.debian.org lenny/main libncurses5 5.7+20081213-1 [328kB]
Get:10 http://ftp.jp.debian.org lenny/main ncurses-base 5.7+20081213-1 [178kB]
Get:11 http://ftp.jp.debian.org lenny/main libpam-modules 1.0.1-5 [286kB]
Get:12 http://ftp.jp.debian.org lenny/main apt 0.7.20 [1605kB]
Get:13 http://ftp.jp.debian.org lenny/main libpam-runtime 1.0.1-5 [166kB]
Get:14 http://ftp.jp.debian.org lenny/main libpam0g 1.0.1-5 [103kB]
Get:15 http://ftp.jp.debian.org lenny/main apt-utils 0.7.20 [182kB]
Get:16 http://ftp.jp.debian.org lenny/main libncursesw5 5.7+20081213-1 [348kB]
Get:17 http://ftp.jp.debian.org lenny/main aptitude 0.4.11.11-1~lenny1 [2989kB]
Get:18 http://ftp.jp.debian.org lenny/main ed 0.7-3 [48.3kB]
Get:19 http://ftp.jp.debian.org lenny/main libgnutls26 2.4.2-4 [453kB]
Get:20 http://ftp.jp.debian.org lenny/main libssl0.9.8 0.9.8g-15 [851kB]
Get:21 http://ftp.jp.debian.org lenny/main rsyslog 3.18.6-3 [167kB]
Get:22 http://ftp.jp.debian.org lenny/main gcc-4.2-base 4.2.4-5 [99.1kB]
Get:23 http://ftp.jp.debian.org lenny/main procps 1:3.2.7-11 [250kB]
Get:24 http://ftp.jp.debian.org lenny/main locales 2.7-18 [4492kB]
Get:25 http://ftp.jp.debian.org lenny/main openbsd-inetd 0.20080125-2 [33.3kB]
Fetched 21.5MB in 55s (389kB/s)
Preconfiguring packages ...
(Reading database ... 8599 files and directories currently installed.)
Preparing to replace base-files 4.0.6 (using .../base-files_5_armel.deb) ...
Unpacking replacement base-files ...
Processing triggers for man-db ...
Setting up base-files (5) ...
Installing new version of config file /etc/debian_version ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
(Reading database ... 8599 files and directories currently installed.)
Preparing to replace dpkg 1.14.23 (using .../dpkg_1.14.24_armel.deb) ...
Unpacking replacement dpkg ...
Processing triggers for man-db ...
Setting up dpkg (1.14.24) ...
(Reading database ... 8599 files and directories currently installed.)
Preparing to replace ncurses-bin 5.6+20080830-2 (using .../ncurses-bin_5.7+20081213-1_armel.deb) ...
Unpacking replacement ncurses-bin ...
Processing triggers for man-db ...
Setting up ncurses-bin (5.7+20081213-1) ...
(Reading database ... 8604 files and directories currently installed.)
Preparing to replace perl-base 5.10.0-18 (using .../perl-base_5.10.0-19_armel.deb) ...
Unpacking replacement perl-base ...
Processing triggers for man-db ...
Setting up perl-base (5.10.0-19) ...
(Reading database ... 8604 files and directories currently installed.)
Preparing to replace gcc-4.3-base 4.3.2-1 (using .../gcc-4.3-base_4.3.2-1.1_armel.deb) ...
Unpacking replacement gcc-4.3-base ...
Setting up gcc-4.3-base (4.3.2-1.1) ...
(Reading database ... 8604 files and directories currently installed.)
Preparing to replace libgcc1 1:4.3.2-1 (using .../libgcc1_1%3a4.3.2-1.1_armel.deb) ...
Unpacking replacement libgcc1 ...
Setting up libgcc1 (1:4.3.2-1.1) ...
(Reading database ... 8604 files and directories currently installed.)
Preparing to replace libstdc++6 4.3.2-1 (using .../libstdc++6_4.3.2-1.1_armel.deb) ...
Unpacking replacement libstdc++6 ...
Setting up libstdc++6 (4.3.2-1.1) ...
(Reading database ... 8604 files and directories currently installed.)
Preparing to replace libc6 2.7-16 (using .../libc6_2.7-18_armel.deb) ...
Unpacking replacement libc6 ...
Processing triggers for man-db ...
Setting up libc6 (2.7-18) ...
(Reading database ... 8604 files and directories currently installed.)
Preparing to replace libncurses5 5.6+20080830-2 (using .../libncurses5_5.7+20081213-1_armel.deb) ...
Unpacking replacement libncurses5 ...
Setting up libncurses5 (5.7+20081213-1) ...
(Reading database ... 8604 files and directories currently installed.)
Preparing to replace ncurses-base 5.6+20080830-2 (using .../ncurses-base_5.7+20081213-1_all.deb) ...
Unpacking replacement ncurses-base ...
Setting up ncurses-base (5.7+20081213-1) ...
(Reading database ... 8607 files and directories currently installed.)
Preparing to replace libpam-modules 1.0.1-4 (using .../libpam-modules_1.0.1-5_armel.deb) ...
Unpacking replacement libpam-modules ...
Processing triggers for man-db ...
Setting up libpam-modules (1.0.1-5) ...
(Reading database ... 8607 files and directories currently installed.)
Preparing to replace apt 0.7.18 (using .../archives/apt_0.7.20_armel.deb) ...
Unpacking replacement apt ...
Processing triggers for man-db ...
Setting up apt (0.7.20) ...
gpg: key 6070D3A1: "Debian Archive Automatic Signing Key (4.0/etch) " not changed
gpg: key ADB11277: "Etch Stable Release Key " not changed
gpg: key BBE55AB3: "Debian-Volatile Archive Automatic Signing Key (4.0/etch)" not changed
gpg: key F42584E6: "Lenny Stable Release Key " not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
(Reading database ... 8607 files and directories currently installed.)
Preparing to replace libpam-runtime 1.0.1-4 (using .../libpam-runtime_1.0.1-5_all.deb) ...
Unpacking replacement libpam-runtime ...
Processing triggers for man-db ...
Setting up libpam-runtime (1.0.1-5) ...
(Reading database ... 8607 files and directories currently installed.)
Preparing to replace libpam0g 1.0.1-4 (using .../libpam0g_1.0.1-5_armel.deb) ...
Unpacking replacement libpam0g ...
Setting up libpam0g (1.0.1-5) ...
(Reading database ... 8607 files and directories currently installed.)
Preparing to replace apt-utils 0.7.18 (using .../apt-utils_0.7.20_armel.deb) ...
Unpacking replacement apt-utils ...
Preparing to replace libncursesw5 5.6+20080830-2 (using .../libncursesw5_5.7+20081213-1_armel.deb) ...
Unpacking replacement libncursesw5 ...
Preparing to replace aptitude 0.4.11.10-1lenny1.1 (using .../aptitude_0.4.11.11-1~lenny1_armel.deb) ...
Unpacking replacement aptitude ...
Preparing to replace ed 0.7-2 (using .../archives/ed_0.7-3_armel.deb) ...
Unpacking replacement ed ...
Preparing to replace libgnutls26 2.4.2-3 (using .../libgnutls26_2.4.2-4_armel.deb) ...
Unpacking replacement libgnutls26 ...
Preparing to replace libssl0.9.8 0.9.8g-14 (using .../libssl0.9.8_0.9.8g-15_armel.deb) ...
Unpacking replacement libssl0.9.8 ...
Preparing to replace rsyslog 3.18.5-1 (using .../rsyslog_3.18.6-3_armel.deb) ...
Unpacking replacement rsyslog ...
Preparing to replace gcc-4.2-base 4.2.4-4 (using .../gcc-4.2-base_4.2.4-5_armel.deb) ...
Unpacking replacement gcc-4.2-base ...
Preparing to replace procps 1:3.2.7-8 (using .../procps_1%3a3.2.7-11_armel.deb) ...
Unpacking replacement procps ...
Preparing to replace locales 2.7-16 (using .../locales_2.7-18_all.deb) ...
Unpacking replacement locales ...
Preparing to replace openbsd-inetd 0.20080125-1 (using .../openbsd-inetd_0.20080125-2_armel.deb) ...
Stopping internet superserver: inetd.
Unpacking replacement openbsd-inetd ...
Processing triggers for man-db ...
Setting up apt-utils (0.7.20) ...
Setting up libncursesw5 (5.7+20081213-1) ...
Setting up aptitude (0.4.11.11-1~lenny1) ...
Setting up ed (0.7-3) ...
Setting up libgnutls26 (2.4.2-4) ...
Setting up libssl0.9.8 (0.9.8g-15) ...
Setting up rsyslog (3.18.6-3) ...
Installing new version of config file /etc/init.d/rsyslog ...
Installing new version of config file /etc/rsyslog.conf ...
Stopping enhanced syslogd: rsyslogd.
Starting enhanced syslogd: rsyslogd.
Setting up gcc-4.2-base (4.2.4-5) ...
Setting up procps (1:3.2.7-11) ...
Installing new version of config file /etc/init.d/procps ...
Installing new version of config file /etc/sysctl.conf ...
Setting kernel variables (/etc/sysctl.conf)...done.
Setting up locales (2.7-18) ...
Generating locales (this might take a while)...
  ja_JP.EUC-JP... done
  ja_JP.UTF-8... done
Generation complete.
Setting up openbsd-inetd (0.20080125-2) ...
Installing new version of config file /etc/init.d/openbsd-inetd ...
Stopping internet superserver: inetd.
Starting internet superserver: inetd.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcap1 libedit2 perl perl-modules
Suggested packages:
  ntp-doc perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl
The following NEW packages will be installed:
  libcap1 libedit2 ntp perl perl-modules
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 8257kB of archives.
After this operation, 29.2MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org lenny/main libedit2 2.11~20080614-1 [64.5kB]
Get:2 http://ftp.jp.debian.org lenny/main perl-modules 5.10.0-19 [3189kB]
Get:3 http://ftp.jp.debian.org lenny/main perl 5.10.0-19 [4535kB]
Get:4 http://ftp.jp.debian.org lenny/main libcap1 1:1.10-14 [9074B]
Get:5 http://ftp.jp.debian.org lenny/main ntp 1:4.2.4p4+dfsg-8 [459kB]
Fetched 8257kB in 22s (373kB/s)
Selecting previously deselected package libedit2.
(Reading database ... 8610 files and directories currently installed.)
Unpacking libedit2 (from .../libedit2_2.11~20080614-1_armel.deb) ...
Selecting previously deselected package perl-modules.
Unpacking perl-modules (from .../perl-modules_5.10.0-19_all.deb) ...
Selecting previously deselected package perl.
Unpacking perl (from .../perl_5.10.0-19_armel.deb) ...
Selecting previously deselected package libcap1.
Unpacking libcap1 (from .../libcap1_1%3a1.10-14_armel.deb) ...
Selecting previously deselected package ntp.
Unpacking ntp (from .../ntp_1%3a4.2.4p4+dfsg-8_armel.deb) ...
Processing triggers for man-db ...
Setting up libedit2 (2.11~20080614-1) ...
Setting up libcap1 (1:1.10-14) ...
Setting up ntp (1:4.2.4p4+dfsg-8) ...
Starting NTP server: ntpd.
Setting up perl-modules (5.10.0-19) ...
Setting up perl (5.10.0-19) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcups2 libkeyutils1 libkrb53 libldap-2.4-2 libtalloc1 libwbclient0
  samba-common ucf
Suggested packages:
  cups-common krb5-doc krb5-user smbldap-tools ldb-tools
The following NEW packages will be installed:
  libcups2 libkeyutils1 libkrb53 libldap-2.4-2 libtalloc1 libwbclient0 samba
  samba-common ucf
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 8601kB of archives.
After this operation, 23.0MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp.jp.debian.org lenny/main libkeyutils1 1.2-9 [5228B]
Get:2 http://ftp.jp.debian.org lenny/main libkrb53 1.6.dfsg.4~beta1-5 [448kB]
Get:3 http://ftp.jp.debian.org lenny/main libldap-2.4-2 2.4.11-1 [179kB]
Get:4 http://ftp.jp.debian.org lenny/main ucf 3.0011 [61.8kB]
Get:5 http://ftp.jp.debian.org lenny/main libcups2 1.3.8-1lenny4.1 [157kB]
Get:6 http://ftp.jp.debian.org lenny/main libtalloc1 1.2.0~git20080616-1 [13.3kB]
Get:7 http://ftp.jp.debian.org lenny/main libwbclient0 2:3.2.5-4 [78.1kB]
Get:8 http://ftp.jp.debian.org lenny/main samba-common 2:3.2.5-4 [3366kB]
Get:9 http://ftp.jp.debian.org lenny/main samba 2:3.2.5-4 [4292kB]
Fetched 8601kB in 21s (392kB/s)
Preconfiguring packages ...

Package configuration





   lqqqqqqqqqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
   x Please specify the workgroup you want this server to appear to be in   x
   x when queried by clients. Note that this parameter also controls the    x
   x domain name used with the security=domain setting.                     x
   x                                                                        x
   x Workgroup/Domain Name:                                                 x
   x                                                                        x
   x YAMASHITA_____________________________________________________________ x
   x                                                                        x
   x                                                                    x
   x                                                                        x
   mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


Package configuration



 lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
 x                                                                           x
 x If your computer gets IP address information from a DHCP server on the    x
 x network, the DHCP server may also provide information about WINS servers  x
 x ("NetBIOS name servers") present on the network.  This requires a change  x
 x to your smb.conf file so that DHCP-provided WINS settings will            x
 x automatically be read from /etc/samba/dhcp.conf.                          x
 x                                                                           x
 x The dhcp3-client package must be installed to take advantage of this      x
 x feature.                                                                  x
 x                                                                           x
 x Modify smb.conf to use WINS settings from DHCP?                           x
 x                                                                           x
 x                                                                  x
 x                                                                           x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj



Selecting previously deselected package libkeyutils1.
(Reading database ... 9862 files and directories currently installed.)
Unpacking libkeyutils1 (from .../libkeyutils1_1.2-9_armel.deb) ...
Selecting previously deselected package libkrb53.
Unpacking libkrb53 (from .../libkrb53_1.6.dfsg.4~beta1-5_armel.deb) ...
Selecting previously deselected package libldap-2.4-2.
Unpacking libldap-2.4-2 (from .../libldap-2.4-2_2.4.11-1_armel.deb) ...
Selecting previously deselected package ucf.
Unpacking ucf (from .../archives/ucf_3.0011_all.deb) ...
Moving old data out of the way
Selecting previously deselected package libcups2.
Unpacking libcups2 (from .../libcups2_1.3.8-1lenny4.1_armel.deb) ...
Selecting previously deselected package libtalloc1.
Unpacking libtalloc1 (from .../libtalloc1_1.2.0~git20080616-1_armel.deb) ...
Selecting previously deselected package libwbclient0.
Unpacking libwbclient0 (from .../libwbclient0_2%3a3.2.5-4_armel.deb) ...
Selecting previously deselected package samba-common.
Unpacking samba-common (from .../samba-common_2%3a3.2.5-4_armel.deb) ...
Selecting previously deselected package samba.
Unpacking samba (from .../samba_2%3a3.2.5-4_armel.deb) ...
Processing triggers for man-db ...
Setting up libkeyutils1 (1.2-9) ...
Setting up libkrb53 (1.6.dfsg.4~beta1-5) ...
Setting up libldap-2.4-2 (2.4.11-1) ...
Setting up ucf (3.0011) ...
Setting up libcups2 (1.3.8-1lenny4.1) ...
Setting up libtalloc1 (1.2.0~git20080616-1) ...
Setting up libwbclient0 (2:3.2.5-4) ...
Setting up samba-common (2:3.2.5-4) ...

Creating config file /etc/samba/smb.conf with new version
Setting up samba (2:3.2.5-4) ...
Generating /etc/default/samba...
tdbsam_open: Converting version 0 database to version 3.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Importing account for root...ok
Importing account for daemon...ok
Importing account for bin...ok
Importing account for sys...ok
Importing account for sync...ok
Importing account for games...ok
Importing account for man...ok
Importing account for lp...ok
Importing account for mail...ok
Importing account for news...ok
Importing account for uucp...ok
Importing account for proxy...ok
Importing account for www-data...ok
Importing account for backup...ok
Importing account for list...ok
Importing account for irc...ok
Importing account for gnats...ok
Importing account for nobody...ok
Importing account for libuuid...ok
Importing account for guest...ok
Importing account for telnetd...ok
Importing account for yasunari...ok
Importing account for ntp...ok
Adding group `sambashare' (GID 105) ...
Done.
Starting Samba daemons: nmbd smbd.
Reloading /etc/samba/smb.conf: smbd only.
New SMB password:
Retype new SMB password:
ude:~#
あとは、
・yasunari でログインし直して、deluser guest を実行
・ntp.conf の修正、ntpd の再起動
を実行すれば、完了。

guest の削除

ude:~# exit
logout
guest@ude:/$ exit
もう一回 telnet して
Debian GNU/Linux 5.0
ude login: yasunari
Password:
Linux ude 2.6.16.16-arm1 #37 Tue May 20 10:01:57 JST 2008 armv5tejl

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
yasunari@ude:~$ su - root
Password:
ude:~# deluser guest
Removing user `guest' ...
Warning: group `guest' has no more members.
Done.
ude:~#

ntp.conf の修正

ude:~# cd /etc
ude:/etc# mv ntp.conf ntp.conf.orig
ude:/etc#
ここで、vi を使って編集したのではおもしろくないし、 スクリプト化を考慮して sed で編集する。
ude:/etc# sed -e 's/^server/# server/' -e '/ntp.your-provider.example/aserver ntp3.jst.mfeed.ad.jp\
server ntp2.jst.mfeed.ad.jp\
server ntp1.jst.mfeed.ad.jp' ntp.conf.orig > ntp.conf
ude:/etc# diff -c ntp.conf.orig ntp.conf
*** ntp.conf.orig       Thu Jan  8 06:08:44 2009
--- ntp.conf    Sat Jan 24 07:03:50 2009
***************
*** 14,27 ****

  # You do need to talk to an NTP server or two (or three).
  #server ntp.your-provider.example

  # pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
  # pick a different set every time it starts up.  Please consider joining the
  # pool: 
! server 0.debian.pool.ntp.org iburst dynamic
! server 1.debian.pool.ntp.org iburst dynamic
! server 2.debian.pool.ntp.org iburst dynamic
! server 3.debian.pool.ntp.org iburst dynamic


  # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
--- 14,30 ----

  # You do need to talk to an NTP server or two (or three).
  #server ntp.your-provider.example
+ server ntp3.jst.mfeed.ad.jp
+ server ntp2.jst.mfeed.ad.jp
+ server ntp1.jst.mfeed.ad.jp

  # pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
  # pick a different set every time it starts up.  Please consider joining the
  # pool: 
! # server 0.debian.pool.ntp.org iburst dynamic
! # server 1.debian.pool.ntp.org iburst dynamic
! # server 2.debian.pool.ntp.org iburst dynamic
! # server 3.debian.pool.ntp.org iburst dynamic


  # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
ude:/etc#

ntpd の再起動

ude:/etc# /etc/init.d/ntp restart
Stopping NTP server: ntpd.
Starting NTP server: ntpd.
ude:/etc#
スクリプトに反映しとこ。

LS-GL
バッファローダイレクト
楽天市場
Amazon
Yahoo!ショッピング
ソフマップ
livedoor デパート
ドスパラ


LS-Q1.0TL/1D 入手 / I got a LS-Q1.0TL/1D
ハックの記録
LinkStation/玄箱 をハックしよう

大きさ比較

Copyright (C) 2003-2009 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市