最初の設定~ftp サーバ

Debian LS-SL

ハックキットが動き始めたので、 最初の設定から ftp サーバまで

最初の設定

起動

ログイン

root になる

シリアルコンソールから、直接root でログイン
Debian GNU/Linux squeeze/sid sl ttyS0

sl login: root
Password:
Last login: Thu Jan  1 09:01:03 JST 1970 on ttyS0
Linux sl 2.6.22.7-88f5182 #1 Fri Jun 8 11:00:39 JST 2012 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.
root@sl:~#

時計を合わせる

root@sl:~# date
Thu Jan  1 09:16:48 JST 1970
root@sl:~# date 072213272012
Sun Jul 22 13:27:00 JST 2012
root@sl:~#

root のパスワード変更 ~

ここからは、いつものスクリプトで実行する
root@sl:~# cd /mnt/disk1/share/hackkit/
root@sl:/mnt/disk1/share/hackkit# sh -x setup_090717.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://security.debian.org squeeze/updates Release.gpg [836 B]
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Get:2 http://ftp.jp.debian.org squeeze Release.gpg [1672 B]
Ign http://ftp.jp.debian.org/debian/ squeeze/main Translation-en
Get:3 http://ftp.jp.debian.org squeeze Release [111 kB]
Get:4 http://security.debian.org squeeze/updates Release [86.9 kB]
Get:5 http://ftp.jp.debian.org squeeze/main Sources [5768 kB]
Get:6 http://ftp.jp.debian.org squeeze/main armel Packages [8440 kB]
Get:7 http://security.debian.org squeeze/updates/main Sources [103 kB]
Get:8 http://security.debian.org squeeze/updates/main armel Packages [308 kB]
Fetched 14.8 MB in 29s (496 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 aptitude base-files bsdutils debconf debconf-i18n dpkg
  e2fslibs e2fsprogs inetutils-inetd inetutils-telnetd initscripts
  isc-dhcp-client isc-dhcp-common libblkid1 libbz2-1.0 libc-bin libc6
  libcomerr2 libgnutls26 libgssapi-krb5-2 libk5crypto3 libkrb5-3
  libkrb5support0 libncurses5 libncursesw5 libpam-modules libpam-runtime
  libpam0g libss2 libssl0.9.8 libtasn1-3 libuuid1 locales login lsb-base
  man-db module-init-tools mount ncurses-base ncurses-bin netbase passwd perl
  perl-base perl-modules procps smartmontools sysv-rc sysvinit sysvinit-utils
  tzdata update-inetd util-linux
55 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 38.9 MB of archives.
After this operation, 283 kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main base-files armel 6.0squeeze5 [73.7 kB]
	:
	:
Setting up inetutils-inetd (2:1.6-3.1+squeeze1) ...
Starting internet superserver: inetd.
Setting up inetutils-telnetd (2:1.6-3.1+squeeze1) ...
Setting up perl (5.10.1-17squeeze3) ...
	:
	:
+ apt-get install ntp
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libbsd0 libcap2 libedit2 libopts25
Suggested packages:
  ntp-doc
The following NEW packages will be installed:
  libbsd0 libcap2 libedit2 libopts25 ntp
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 661 kB of archives.
After this operation, 1675 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libcap2 armel 1:2.19-3 [11.8 kB]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main libbsd0 armel 0.2.0-1 [41.4 kB]
Get:3 http://ftp.jp.debian.org/debian/ squeeze/main libedit2 armel 2.11-20080614-2 [60.2 kB]
Get:4 http://ftp.jp.debian.org/debian/ squeeze/main libopts25 armel 1:5.10-1.1 [62.8 kB]
Get:5 http://ftp.jp.debian.org/debian/ squeeze/main ntp armel 1:4.2.6.p2+dfsg-1+b1 [484 kB]
Fetched 661 kB in 0s (1367 kB/s)
Selecting previously deselected package libcap2.
(Reading database ... 10784 files and directories currently installed.)
Unpacking libcap2 (from .../libcap2_1%3a2.19-3_armel.deb) ...
Selecting previously deselected package libbsd0.
Unpacking libbsd0 (from .../libbsd0_0.2.0-1_armel.deb) ...
Selecting previously deselected package libedit2.
Unpacking libedit2 (from .../libedit2_2.11-20080614-2_armel.deb) ...
Selecting previously deselected package libopts25.
Unpacking libopts25 (from .../libopts25_1%3a5.10-1.1_armel.deb) ...
Selecting previously deselected package ntp.
Unpacking ntp (from .../ntp_1%3a4.2.6.p2+dfsg-1+b1_armel.deb) ...
Processing triggers for man-db ...
Setting up libcap2 (1:2.19-3) ...
Setting up libbsd0 (0.2.0-1) ...
Setting up libedit2 (2.11-20080614-2) ...
Setting up libopts25 (1:5.10-1.1) ...
Setting up ntp (1:4.2.6.p2+dfsg-1+b1) ...
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 samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dbus libavahi-client3 libavahi-common-data libavahi-common3 libcups2
  libdbus-1-3 libexpat1 libldap-2.4-2 libsasl2-2 libsasl2-modules libtalloc2
  libwbclient0 samba-common samba-common-bin ucf
Suggested packages:
  dbus-x11 cups-common libsasl2-modules-otp libsasl2-modules-ldap
  libsasl2-modules-sql libsasl2-modules-gssapi-mit
  libsasl2-modules-gssapi-heimdal smbldap-tools ldb-tools ctdb
The following NEW packages will be installed:
  dbus libavahi-client3 libavahi-common-data libavahi-common3 libcups2
  libdbus-1-3 libexpat1 libldap-2.4-2 libsasl2-2 libsasl2-modules libtalloc2
  libwbclient0 samba samba-common samba-common-bin ucf
0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.2 MB of archives.
After this operation, 42.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libsasl2-2 armel 2.1.23.dfsg1-7 [106 kB]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main libldap-2.4-2 armel 2.4.23-7.2 [189 kB]
Get:3 http://ftp.jp.debian.org/debian/ squeeze/main ucf all 3.0025+nmu1 [69.6 kB]
Get:4 http://ftp.jp.debian.org/debian/ squeeze/main libdbus-1-3 armel 1.2.24-4+squeeze1 [129 kB]
Get:5 http://ftp.jp.debian.org/debian/ squeeze/main libexpat1 armel 2.0.1-7 [118 kB]
Get:6 http://ftp.jp.debian.org/debian/ squeeze/main dbus armel 1.2.24-4+squeeze1 [212 kB]
Get:7 http://ftp.jp.debian.org/debian/ squeeze/main libavahi-common-data armel 0.6.27-2+squeeze1 [111 kB]
Get:8 http://ftp.jp.debian.org/debian/ squeeze/main libavahi-common3 armel 0.6.27-2+squeeze1 [52.0 kB]
Get:9 http://ftp.jp.debian.org/debian/ squeeze/main libavahi-client3 armel 0.6.27-2+squeeze1 [52.9 kB]
Get:10 http://ftp.jp.debian.org/debian/ squeeze/main libcups2 armel 1.4.4-7+squeeze1 [225 kB]
Get:11 http://ftp.jp.debian.org/debian/ squeeze/main libsasl2-modules armel 2.1.23.dfsg1-7 [145 kB]
Get:12 http://ftp.jp.debian.org/debian/ squeeze/main libtalloc2 armel 2.0.1-1 [18.0 kB]
Get:13 http://ftp.jp.debian.org/debian/ squeeze/main libwbclient0 armel 2:3.5.6~dfsg-3squeeze8 [113 kB]
Get:14 http://ftp.jp.debian.org/debian/ squeeze/main samba-common all 2:3.5.6~dfsg-3squeeze8 [388 kB]
Get:15 http://ftp.jp.debian.org/debian/ squeeze/main samba armel 2:3.5.6~dfsg-3squeeze8 [7539 kB]
Get:16 http://ftp.jp.debian.org/debian/ squeeze/main samba-common-bin armel 2:3.5.6~dfsg-3squeeze8 [5722 kB]
Fetched 15.2 MB in 5s (2751 kB/s)
Preconfiguring packages ...

Package configuration




  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
  x Please specify the workgroup for this system.  This setting controls     x
  x which workgroup the system will appear in when used as a server, the     x
  x default workgroup to be used when browsing with various frontends, and   x
  x the domain name used with the "security=domain" setting.                 x
  x                                                                          x
  x Workgroup/Domain Name:                                                   x
  x                                                                          x
  x YAMASITA________________________________________________________________ x
  x                                                                          x
  x                                  <Ok>                                    x
  x                                                                          x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj





Selecting previously deselected package libsasl2-2.
(Reading database ... 10843 files and directories currently installed.)
Unpacking libsasl2-2 (from .../libsasl2-2_2.1.23.dfsg1-7_armel.deb) ...
Selecting previously deselected package libldap-2.4-2.
Unpacking libldap-2.4-2 (from .../libldap-2.4-2_2.4.23-7.2_armel.deb) ...
Selecting previously deselected package ucf.
Unpacking ucf (from .../ucf_3.0025+nmu1_all.deb) ...
Moving old data out of the way
Selecting previously deselected package libdbus-1-3.
Unpacking libdbus-1-3 (from .../libdbus-1-3_1.2.24-4+squeeze1_armel.deb) ...
Selecting previously deselected package libexpat1.
Unpacking libexpat1 (from .../libexpat1_2.0.1-7_armel.deb) ...
Selecting previously deselected package dbus.
Unpacking dbus (from .../dbus_1.2.24-4+squeeze1_armel.deb) ...
Selecting previously deselected package libavahi-common-data.
Unpacking libavahi-common-data (from .../libavahi-common-data_0.6.27-2+squeeze1_armel.deb) ...
Selecting previously deselected package libavahi-common3.
Unpacking libavahi-common3 (from .../libavahi-common3_0.6.27-2+squeeze1_armel.deb) ...
Selecting previously deselected package libavahi-client3.
Unpacking libavahi-client3 (from .../libavahi-client3_0.6.27-2+squeeze1_armel.deb) ...
Selecting previously deselected package libcups2.
Unpacking libcups2 (from .../libcups2_1.4.4-7+squeeze1_armel.deb) ...
Selecting previously deselected package libsasl2-modules.
Unpacking libsasl2-modules (from .../libsasl2-modules_2.1.23.dfsg1-7_armel.deb) ...
Selecting previously deselected package libtalloc2.
Unpacking libtalloc2 (from .../libtalloc2_2.0.1-1_armel.deb) ...
Selecting previously deselected package libwbclient0.
Unpacking libwbclient0 (from .../libwbclient0_2%3a3.5.6~dfsg-3squeeze8_armel.deb) ...
Selecting previously deselected package samba-common.
Unpacking samba-common (from .../samba-common_2%3a3.5.6~dfsg-3squeeze8_all.deb) ...
Selecting previously deselected package samba.
Unpacking samba (from .../samba_2%3a3.5.6~dfsg-3squeeze8_armel.deb) ...
Selecting previously deselected package samba-common-bin.
Unpacking samba-common-bin (from .../samba-common-bin_2%3a3.5.6~dfsg-3squeeze8_armel.deb) ...
Processing triggers for man-db ...
Setting up libsasl2-2 (2.1.23.dfsg1-7) ...
Setting up libldap-2.4-2 (2.4.23-7.2) ...
Setting up ucf (3.0025+nmu1) ...
Setting up libdbus-1-3 (1.2.24-4+squeeze1) ...
Setting up libexpat1 (2.0.1-7) ...
Setting up dbus (1.2.24-4+squeeze1) ...
Starting system message bus: dbus.
Setting up libavahi-common-data (0.6.27-2+squeeze1) ...
Setting up libavahi-common3 (0.6.27-2+squeeze1) ...
Setting up libavahi-client3 (0.6.27-2+squeeze1) ...
Setting up libcups2 (1.4.4-7+squeeze1) ...
Setting up libsasl2-modules (2.1.23.dfsg1-7) ...
Setting up libtalloc2 (2.0.1-1) ...
Setting up libwbclient0 (2:3.5.6~dfsg-3squeeze8) ...
Setting up samba-common (2:3.5.6~dfsg-3squeeze8) ...

Creating config file /etc/samba/smb.conf with new version
Setting up samba (2:3.5.6~dfsg-3squeeze8) ...
Generating /etc/default/samba...
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated /var/lib/samba/passdb.tdb file.
account_policy_get: tdb_fetch_uint32 failed for type 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 10 (refuse machine password change), returning 0
Importing account for nobody...ok
Importing account for yasunari...ok
Adding group `sambashare' (GID 105) ...
Done.
update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode.
Starting Samba daemons: nmbd smbd.
Setting up samba-common-bin (2:3.5.6~dfsg-3squeeze8) ...
update-alternatives: using /usr/bin/nmblookup.samba3 to provide /usr/bin/nmblookup (nmblookup) in auto mode.
update-alternatives: using /usr/bin/net.samba3 to provide /usr/bin/net (net) in auto mode.
update-alternatives: using /usr/bin/testparm.samba3 to provide /usr/bin/testparm (testparm) in auto mode.
+ 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 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 120 kB of archives.
After this operation, 238 kB of additional disk space will be used.
Get:1 http://ftp.jp.debian.org/debian/ squeeze/main inetutils-ftpd armel 2:1.6-3.1+squeeze1 [120 kB]
Fetched 120 kB in 0s (472 kB/s)
Selecting previously deselected package inetutils-ftpd.
(Reading database ... 11157 files and directories currently installed.)
Unpacking inetutils-ftpd (from .../inetutils-ftpd_2%3a1.6-3.1+squeeze1_armel.deb) ...
Processing triggers for man-db ...
Setting up inetutils-ftpd (2:1.6-3.1+squeeze1) ...
+ echo ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  ftpd
+ cat /var/run/inetd.pid
+ kill -HUP 6858
+ apt-get clean
root@sl:/mnt/disk1/share/hackkit#
特に問題なさそう、、、

LS-SL
楽天市場




ハックキットのインストール
ハックの記録
LinkStation/玄箱 をハックしよう

sudo と 開発環境のインストール

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

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