最初の設定 〜 ftp サーバ

Debian LS-QVL

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

最初の設定

起動

ログイン

Linux 2.6.31.8 (x60l.yamasita.jp) (pts/0)
qvl login: guest
Password:
Last login: Sun Jul 1 16:03:44 JST 2012 from x60l.yamasita.jp on pts/0
Linux qvl 2.6.31.8 #2 Tue Mar 13 13:10:42 JST 2012 armv5tel
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@qvl:/$

root になる

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

時計を合わせる

root@qvl:~# date
Sun Jul 1 16:24:43 JST 2012
root@qvl:~#
合ってる

root のパスワード変更 〜

ここからは、いつものスクリプトで実行する
root@qvl:~# cat setup_090717.sh
#!/bin/sh
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
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
echo smbpasswd -a yasunari
smbpasswd -a yasunari
mkdir /mnt/share
chgrp yamasita /mnt/share/
chmod g+w /mnt/share
# 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@qvl:~#
root@qvl:~# 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.
userdel: user guest is currently logged in
/usr/sbin/deluser: `/usr/sbin/userdel guest' returned error code 8. Exiting.
+ apt-get update
Get:1 http://ftp.jp.debian.org squeeze Release.gpg [1672 B]
Ign http://ftp.jp.debian.org/debian/ squeeze/main Translation-en
Get:2 http://ftp.jp.debian.org squeeze Release [111 kB]
Get:3 http://ftp.jp.debian.org squeeze/main Sources [5768 kB]
Get:4 http://security.debian.org squeeze/updates Release.gpg [836 B]
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Get:5 http://security.debian.org squeeze/updates Release [86.9 kB]
Get:6 http://ftp.jp.debian.org squeeze/main armel Packages [8440 kB]
Get:7 http://security.debian.org squeeze/updates/main Sources [99.9 kB]
Get:8 http://security.debian.org squeeze/updates/main armel Packages [283 kB]
Fetched 14.8 MB in 7s (1884 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]
Get:2 http://ftp.jp.debian.org/debian/ squeeze/main dpkg armel 1.15.8.12 [2342 kB]
	:
	:
	:
Get:54 http://ftp.jp.debian.org/debian/ squeeze/main inetutils-inetd armel 2:1.6-3.1+squeeze1 [109 kB]
Get:55 http://ftp.jp.debian.org/debian/ squeeze/main inetutils-telnetd armel 2:1.6-3.1+squeeze1 [117 kB]
Fetched 38.9 MB in 9s (3957 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 10758 files and directories currently installed.)
Preparing to replace base-files 5.10 (using .../base-files_6.0squeeze5_armel.deb) ...
Unpacking replacement base-files ...
Processing triggers for install-info ...
Processing triggers for man-db ...
Setting up base-files (6.0squeeze5) ...
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 ... 10758 files and directories currently installed.)
Preparing to replace dpkg 1.15.8.5 (using .../dpkg_1.15.8.12_armel.deb) ...
Unpacking replacement dpkg ...
Processing triggers for man-db ...
Setting up dpkg (1.15.8.12) ...
(Reading database ... 10759 files and directories currently installed.)
	:
	:
	:
Preparing to replace inetutils-telnetd 2:1.6-3 (using .../inetutils-telnetd_2%3a1.6-3.1+squeeze1_armel.deb) ...
Unpacking replacement inetutils-telnetd ...
Setting up apt-utils (0.8.10.3+squeeze1) ...
Setting up libncursesw5 (5.7+20100313-5) ...
Setting up aptitude (0.6.3-3.2+squeeze1) ...
Setting up isc-dhcp-common (4.1.1-P1-15+squeeze3) ...
Setting up isc-dhcp-client (4.1.1-P1-15+squeeze3) ...
Setting up libssl0.9.8 (0.9.8o-4squeeze13) ...
Setting up man-db (2.5.7-8) ...
Updating database of manual pages ...
Setting up module-init-tools (3.12-2) ...
Setting up netbase (4.45) ...
Installing new version of config file /etc/services ...
Installing new version of config file /etc/protocols ...
Setting up procps (1:3.2.8-9squeeze1) ...
Setting kernel variables ...done.
	:
	:
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: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 58min 11s (4350 B/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
	:
	:
	:
+ 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 (720 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 7303
+ apt-get clean
root@qvl:~#
特に問題なし



動作確認
ハックの記録
LinkStation/玄箱 をハックしよう
sudo と開発環境のインストール

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

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

AltStyle によって変換されたページ (->オリジナル) /