ハックキットの設定

LS-XHL

ちょっと Web サーバが必要になって、 死蔵している LS-XHL を Web サーバに仕立てることにした。

設定を進める。

デフォルトのロケールの変更

まず、デフォルトのロケールを C にしておく
root@brick:~# dpkg-reconfigure locales

lqqqqqqqqqqqqqqqqqqqqqqqqqqu Configuring locales tqqqqqqqqqqqqqqqqqqqqqqqqqqk
 x Many packages in Debian use locales to display text in the correct        x
 x language for the user. You can choose a default locale for the system     x
 x from the generated locales.                                               x
 x                                                                           x
 x This will select the default language for the entire system. If this      x
 x system is a multi-user system where not all users are able to speak the   x
 x default language, they will experience difficulties.                      x
 x                                                                           x
 x Default locale for the system environment:                                x
 x                                                                           x
 x                               None                                        x
 x                               ja_JP.EUC-JP                                x
 x                               ja_JP.UTF-8                                 x
 x                                                                           x
 x                                                                           x
 x                    <Ok>                        <Cancel>                   x
 x                                                                           x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

None にして OK
Generating locales (this might take a while)...
  ja_JP.EUC-JP... done
  ja_JP.UTF-8... done
Generation complete.
root@brick:~#

最初の設定 時刻同期 ftp サーバ

Windows ファイルサーバとか、開発環境は要らないので、 最初の設定 時刻同期 ftp サーバ の手順。

いつものスクリプトをちょっと改変して実行

root@brick:~# cat /tmp/setup.sh
#!/bin/sh

set -x

echo passwd root
passwd root
addgroup --gid 1001 yamasita

echo adduser yasunari
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
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 > /etc/ntp.conf

# ftp server
apt-get install inetutils-ftpd
echo "ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  ftpd" >> /etc/inetd.conf
kill -HUP `cat /var/run/inetd.pid `

apt-get clean
root@brick:~# sh !$
sh /tmp/setup.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.
userdel: user guest is currently used by process 2128
/usr/sbin/deluser: `/usr/sbin/userdel guest' returned error code 8. Exiting.
+ apt-get update
Get:1 http://ftp.jp.debian.org wheezy Release.gpg [1655 B]
Get:2 http://ftp.jp.debian.org wheezy Release [168 kB]
Get:3 http://ftp.jp.debian.org wheezy/main Sources [5955 kB]
Get:4 http://security.debian.org wheezy/updates Release.gpg [836 B]
Get:5 http://security.debian.org wheezy/updates Release [102 kB]
Get:6 http://ftp.jp.debian.org wheezy/main armel Packages [5709 kB]
Get:7 http://security.debian.org wheezy/updates/main Sources [141 kB]
Get:8 http://security.debian.org wheezy/updates/main armel Packages [221 kB]
Get:9 http://ftp.jp.debian.org wheezy/main Translation-en [3846 kB]
Get:10 http://security.debian.org wheezy/updates/main Translation-en [123 kB]
Fetched 16.3 MB in 1min 1s (264 kB/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 bash debian-archive-keyring dpkg gnupg gpgv
  krb5-locales libapt-inst1.5 libapt-pkg4.12 libc-bin libc6 libgnutls26
  libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
  libssl1.0.0 locales multiarch-support openssh-client openssh-server perl
  perl-base perl-modules rsyslog ssh tzdata wget
31 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 35.5 MB of archives.
After this operation, 362 kB disk space will be freed.
Do you want to continue [Y/n]? y
	:
	:
	:
!+ apt-get install ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcap2 libopts25
Suggested packages:
  ntp-doc
The following NEW packages will be installed:
  libcap2 libopts25 ntp
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 621 kB of archives.
After this operation, 1358 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main libcap2 armel 1:2.22-1.2 [12.4 kB]
Get:2 http://ftp.jp.debian.org/debian/ wheezy/main libopts25 armel 1:5.12-0.1 [70.7 kB]
Get:3 http://ftp.jp.debian.org/debian/ wheezy/main ntp armel 1:4.2.6.p5+dfsg-2 [538 kB]
Fetched 621 kB in 0s (960 kB/s)
Selecting previously unselected package libcap2:armel.
(Reading database ... 14662 files and directories currently installed.)
Unpacking libcap2:armel (from .../libcap2_1%3a2.22-1.2_armel.deb) ...
Selecting previously unselected package libopts25.
Unpacking libopts25 (from .../libopts25_1%3a5.12-0.1_armel.deb) ...
Selecting previously unselected package ntp.
Unpacking ntp (from .../ntp_1%3a4.2.6.p5+dfsg-2_armel.deb) ...
Processing triggers for man-db ...
!Setting up libcap2:armel (1:2.22-1.2) ...
Setting up libopts25 (1:5.12-0.1) ...
Setting up ntp (1:4.2.6.p5+dfsg-2) ...
[ ok ] Starting NTP server: ntpd.
!+ 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 inetutils-ftpd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  inetutils-ftpd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 167 kB of archives.
After this operation, 266 kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org/debian/ wheezy/main inetutils-ftpd armel 2:1.9-2 [167 kB]
Fetched 167 kB in 0s (653 kB/s)
Selecting previously unselected package inetutils-ftpd.
(Reading database ... 14708 files and directories currently installed.)
Unpacking inetutils-ftpd (from .../inetutils-ftpd_2%3a1.9-2_armel.deb) ...
Processing triggers for man-db ...
Setting up inetutils-ftpd (2:1.9-2) ...
!+ echo ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  ftpd
+ cat /var/run/inetd.pid
+ kill -HUP 2069
+ apt-get clean
root@brick:~#
できた。

LS-XHL
バッファローダイレクト
楽天市場
amazon
ValuMore


ハックキットの動作確認
ハックの記録
LinkStation/玄箱 をハックしよう

メールの設定

ツイート Tweet to @yasunari_y @yasunari_yをフォロー

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