いちからやり直し、、、(6)最初の設定~Windows 向けファイルサーバ

Debian HS-DHGL

第三世代 LinkStation ハックキットで 「延長対応ハック de ダブルまる録!! 外部チューナコントロールつき」が まあまあ動くようになったが、 インストールに使ったファームウェア 1.20 では、 PC-MV5xDX/U2 が切り捨てられたことを思い出して いちからやり直し。

最初の設定 Windows 向けファイルサーバ

ログイン

root になる

シリアルコンソールからログインするので、 いきなり root でログインする。
Debian GNU/Linux 5.0 slam ttyS0

slam login: root
Password:
Linux slam 2.6.16.16-arm1 #6 Fri Aug 31 13:07:15 JST 2007 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.
slam:~#

時計を合わせる

slam:~# date
Thu Jul  2 13:05:52 JST 2009
slam:~# 
やっぱり9時間ずれ。
slam:~# date 07022205
Thu Jul  2 22:05:00 JST 2009
slam:~#

root のパスワード変更~

root のパスワード変更以降はいつものスクリプトを使う。

スクリプトの転送

内向きファイルサーバの旧型 LS-GL(ude)からスクリプトを転送する。
slam:~# ftp ude.yamasita.jp
Connected to ude.yamasita.jp.
220 ude FTP server (GNU inetutils 1.5) ready.
Name (ude.yamasita.jp:root): yasunari
331 Password required for yasunari.
Password:
230- Linux ude 2.6.16.16-arm1 #37 Tue May 20 10:01:57 JST 2008 armv5tejl
230-
230- The programs included with the Debian GNU/Linux system are free software;
230- the exact distribution terms for each program are described in the
230- individual files in /usr/share/doc/*/copyright.
230-
230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
230- permitted by applicable law.
230 User yasunari logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /home/linkstation
250 CWD command successful.
ftp> ls
200 PORT command sucessful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 4
drwxrwsr-x  8 yamasita   90 Jan 27 23:59 HackKit
drwxrwsr-x 13 yamasita 4096 May 27 21:38 firmware
226 Transfer complete.
ftp> cd HackKit
250 CWD command successful.
ftp> ls
200 PORT command sucessful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 4
drwxrwsr-x 5 yamasita   54 Jan 27 23:52 KURO-BOX-Pro
drwxrwsr-x 3 yamasita  146 Jan 27 23:53 LS-CL
drwxrwsr-x 7 yamasita   98 Jan 27 23:58 LS-GL
drwxrwsr-x 2 yamasita   97 Jan 27 23:59 LS-HGL
drwxrwsr-x 2 yamasita 4096 Jan 27 23:59 LS-WSGL
drwxrwsr-x 7 yamasita   69 Mar  3 22:45 unified
226 Transfer complete.
ftp> cd unified
250 CWD command successful.
ftp> ls
200 PORT command sucessful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 8
drwxrwsr-x 2 yamasita   96 Jan 27 23:50 081218
drwxrwsr-x 2 yamasita  120 Feb 17 18:52 090217
drwxrwsr-x 2 yamasita  124 Mar  3 22:45 090303
drwxrwsr-x 2 yamasita 4096 Feb 27 20:53 current
drwxrwsr-x 2 yamasita 4096 Mar  3 22:44 old
226 Transfer complete.
ftp> cd current
250 CWD command successful.
ftp> ls
200 PORT command sucessful.
150 Opening ASCII mode data connection for '/bin/ls'.
total 65712
-rw-rw-r-- 1 yamasita 67237983 Feb 26 22:49 hackkit_090226.tar.gz
-rw-rw-r-- 1 yamasita    16323 Feb 27 20:53 hackkit_090227.sh
-rw-rw-r-- 1 yamasita       35 Feb 18 20:55 hackkit_config.sample
-rw-rw-r-- 1 yamasita    15920 Oct 26  2008 mkimage
-rw-r--r-- 1 yamasita     1109 Feb 25 22:20 ramroot_090225.sh
-rw-r--r-- 1 yamasita      201 Feb 25 22:11 rsync_090225.sh
-rw-rw-r-- 1 yamasita      846 Feb  3 20:50 setup_090203.sh
226 Transfer complete.
ftp> get setup_090203.sh
local: setup_090203.sh remote: setup_090203.sh
200 PORT command sucessful.
150 Opening BINARY mode data connection for 'setup_090203.sh' (846 bytes).
226 Transfer complete.
846 bytes received in 0.00 secs (1278.9 kB/s)
ftp> bye
221 Goodbye.
slam:~#

スクリプトの実行

slam:~# sh -x setup_090203.sh
+ echo passwd root
passwd root
+ passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
+ addgroup --gid 1001 yamasita
Adding group `yamasita' (GID 1001) ...
Done.
+ echo adduser yasunari
adduser yasunari
+ adduser --home /home/yamasita/yasunari --ingroup yamasita --uid 1001 --gecos 'Yasunari Yamashita' yasunari
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
+ deluser guest
Removing user `guest' ...
Warning: group `guest' has no more members.
Done.
+ apt-get update
Get:1 http://ftp.jp.debian.org lenny Release.gpg [1032B]
Get:2 http://ftp.jp.debian.org lenny Release [73.6kB]
Get:3 http://security.debian.org lenny/updates Release.gpg [1032B]
Ign http://ftp.jp.debian.org lenny/main Packages/DiffIndex
Ign http://ftp.jp.debian.org lenny/main Sources/DiffIndex
Get:4 http://ftp.jp.debian.org lenny/main Packages [6703kB]
Get:5 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:6 http://security.debian.org lenny/updates/main Packages [157kB]
Get:7 http://security.debian.org lenny/updates/main Sources [44.1kB]
Get:8 http://ftp.jp.debian.org lenny/main Sources [2981kB]
Fetched 10.0MB in 22s (438kB/s)
Reading package lists... Done
+ apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  apt apt-utils base-files gnupg gpgv libgnutls26 libpam-modules
  libpam-runtime libpam0g libsasl2-2 libssl0.9.8 tzdata
12 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 6698kB of archives.
After this operation, 24.6kB 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 5lenny3 [61.6kB]
Get:2 http://ftp.jp.debian.org lenny/main libpam-modules 1.0.1-5+lenny1 [288kB]
Get:3 http://ftp.jp.debian.org lenny/main apt 0.7.20.2+lenny1 [1618kB]
Get:4 http://ftp.jp.debian.org lenny/main gpgv 1.4.9-3+lenny1 [154kB]
Get:5 http://ftp.jp.debian.org lenny/main gnupg 1.4.9-3+lenny1 [1951kB]
Get:6 http://ftp.jp.debian.org lenny/main libpam-runtime 1.0.1-5+lenny1 [165kB]
Get:7 http://ftp.jp.debian.org lenny/main libpam0g 1.0.1-5+lenny1 [103kB]
Get:8 http://ftp.jp.debian.org lenny/main tzdata 2009g-0lenny1 [765kB]
Get:9 http://ftp.jp.debian.org lenny/main apt-utils 0.7.20.2+lenny1 [184kB]
Get:10 http://ftp.jp.debian.org lenny/main libgnutls26 2.4.2-6+lenny1 [452kB]
Get:11 http://ftp.jp.debian.org lenny/main libsasl2-2 2.1.22.dfsg1-23+lenny1 [105kB]
Get:12 http://ftp.jp.debian.org lenny/main libssl0.9.8 0.9.8g-15+lenny1 [850kB]
Fetched 6698kB in 9s (743kB/s)
Preconfiguring packages ...
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace base-files 5 (using .../base-files_5lenny3_armel.deb) ...
Unpacking replacement base-files ...
Processing triggers for man-db ...
Setting up base-files (5lenny3) ...
Installing new version of config file /etc/debian_version ...
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace libpam-modules 1.0.1-5 (using .../libpam-modules_1.0.1-5+lenny1_armel.deb) ...
Unpacking replacement libpam-modules ...
Processing triggers for man-db ...
Setting up libpam-modules (1.0.1-5+lenny1) ...
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace apt 0.7.20.2 (using .../apt_0.7.20.2+lenny1_armel.deb) ...
Unpacking replacement apt ...
Processing triggers for man-db ...
Setting up apt (0.7.20.2+lenny1) ...
Installing new version of config file /etc/cron.daily/apt ...
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: key 55BE302B: "Debian Archive Automatic Signing Key (5.0/lenny) " not changed
gpg: key 6D849617: "Debian-Volatile Archive Automatic Signing Key (5.0/lenny)" not changed
gpg: Total number processed: 6
gpg:              unchanged: 6
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace gpgv 1.4.9-3 (using .../gpgv_1.4.9-3+lenny1_armel.deb) ...
Unpacking replacement gpgv ...
Processing triggers for man-db ...
Setting up gpgv (1.4.9-3+lenny1) ...
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace gnupg 1.4.9-3 (using .../gnupg_1.4.9-3+lenny1_armel.deb) ...
Unpacking replacement gnupg ...
Processing triggers for man-db ...
Setting up gnupg (1.4.9-3+lenny1) ...
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace libpam-runtime 1.0.1-5 (using .../libpam-runtime_1.0.1-5+lenny1_all.deb) ...
Unpacking replacement libpam-runtime ...
Processing triggers for man-db ...
Setting up libpam-runtime (1.0.1-5+lenny1) ...
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace libpam0g 1.0.1-5 (using .../libpam0g_1.0.1-5+lenny1_armel.deb) ...
Unpacking replacement libpam0g ...
Setting up libpam0g (1.0.1-5+lenny1) ...
(Reading database ... 8591 files and directories currently installed.)
Preparing to replace tzdata 2008h-2 (using .../tzdata_2009g-0lenny1_all.deb) ...
Unpacking replacement tzdata ...
Setting up tzdata (2009g-0lenny1) ...

Current default timezone: 'Asia/Tokyo'
Local time is now:      Thu Jul  2 22:10:25 JST 2009.
Universal Time is now:  Thu Jul  2 13:10:25 UTC 2009.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

(Reading database ... 8597 files and directories currently installed.)
Preparing to replace apt-utils 0.7.20.2 (using .../apt-utils_0.7.20.2+lenny1_armel.deb) ...
Unpacking replacement apt-utils ...
Preparing to replace libgnutls26 2.4.2-6 (using .../libgnutls26_2.4.2-6+lenny1_armel.deb) ...
Unpacking replacement libgnutls26 ...
Preparing to replace libsasl2-2 2.1.22.dfsg1-23 (using .../libsasl2-2_2.1.22.dfsg1-23+lenny1_armel.deb) ...
Unpacking replacement libsasl2-2 ...
Preparing to replace libssl0.9.8 0.9.8g-15 (using .../libssl0.9.8_0.9.8g-15+lenny1_armel.deb) ...
Unpacking replacement libssl0.9.8 ...
Processing triggers for man-db ...
Setting up apt-utils (0.7.20.2+lenny1) ...
Setting up libgnutls26 (2.4.2-6+lenny1) ...
Setting up libsasl2-2 (2.1.22.dfsg1-23+lenny1) ...
Setting up libssl0.9.8 (0.9.8g-15+lenny1) ...
+ apt-get install ntp
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-8lenny2 [459kB]
Fetched 8257kB in 3s (2549kB/s)
Selecting previously deselected package libedit2.
(Reading database ... 8597 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-8lenny2_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-8lenny2) ...
Starting NTP server: ntpd.
Setting up perl-modules (5.10.0-19) ...
Setting up perl (5.10.0-19) ...
+ mv /etc/ntp.conf /etc/ntp.conf.orig
+ 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' /etc/ntp.conf.orig
+ apt-get install samba
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 8604kB of archives.
After this operation, 23.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
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-5lenny1 [449kB]
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.0016 [64.4kB]
Get:5 http://ftp.jp.debian.org lenny/main libcups2 1.3.8-1+lenny6 [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-4lenny6 [79.0kB]
Get:8 http://ftp.jp.debian.org lenny/main samba-common 2:3.2.5-4lenny6 [3366kB]
Get:9 http://ftp.jp.debian.org lenny/main samba 2:3.2.5-4lenny6 [4292kB]
Fetched 8604kB in 6s (1248kB/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 YAMASITA______________________________________________________________ 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 ... 9849 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-5lenny1_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.0016_all.deb) ...
Moving old data out of the way
Selecting previously deselected package libcups2.
Unpacking libcups2 (from .../libcups2_1.3.8-1+lenny6_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-4lenny6_armel.deb) ...
Selecting previously deselected package samba-common.
Unpacking samba-common (from .../samba-common_2%3a3.2.5-4lenny6_armel.deb) ...
Selecting previously deselected package samba.
Unpacking samba (from .../samba_2%3a3.2.5-4lenny6_armel.deb) ...
Processing triggers for man-db ...
Setting up libkeyutils1 (1.2-9) ...
Setting up libkrb53 (1.6.dfsg.4~beta1-5lenny1) ...
Setting up libldap-2.4-2 (2.4.11-1) ...
Setting up ucf (3.0016) ...
Setting up libcups2 (1.3.8-1+lenny6) ...
Setting up libtalloc1 (1.2.0~git20080616-1) ...
Setting up libwbclient0 (2:3.2.5-4lenny6) ...
Setting up samba-common (2:3.2.5-4lenny6) ...

Creating config file /etc/samba/smb.conf with new version
Setting up samba (2:3.2.5-4lenny6) ...
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 telnetd...ok
Importing account for yasunari...ok
Importing account for ntp...ok
Adding group `sambashare' (GID 105) ...
Done.
Starting Samba daemons: nmbd smbd.
+ echo
+ echo '[share]'
+ echo '        comment = hackkit share'
+ echo '        path = /mnt'
+ echo '        writable = Yes'
+ echo '        create mask = 0660'
+ echo '        directory mask = 0770'
+ /etc/init.d/samba reload
Reloading /etc/samba/smb.conf: smbd only.
+ echo smbpasswd -a yasunari
smbpasswd -a yasunari
+ smbpasswd -a yasunari
New SMB password:
Retype new SMB password:
+ mkdir /mnt/share
+ chgrp yamasita /mnt/share/
+ chmod g+w /mnt/share
+ apt-get clean
slam:~#



HS-DHGL
バッファローダイレクト
楽天市場
Yahoo!ショッピング
ValuMore!
ムラウチドットコム


いちからやり直し、、、(5)ハックキットで起動
ハックの記録
LinkStation/玄箱 をハックしよう

いちからやり直し、、、(7)動作確認

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