ude:~# apt-get install less Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: less 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. Need to get 103kB of archives. After unpacking 266kB of additional disk space will be used. Get:1 http://ftp.jp.debian.org sarge/main less 382-1 [103kB] Fetched 103kB in 3s (30.6kB/s) Selecting previously deselected package less. (Reading database ... 7625 files and directories currently installed.) Unpacking less (from .../archives/less_382-1_arm.deb) ... Setting up less (382-1) ... ude:~#
ude:~# apt-get install telnetd Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: telnetd 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. Need to get 41.2kB of archives. After unpacking 143kB of additional disk space will be used. Get:1 http://ftp.jp.debian.org sarge/main telnetd 0.17-29 [41.2kB] Fetched 41.2kB in 0s (41.7kB/s) Selecting previously deselected package telnetd. (Reading database ... 7642 files and directories currently installed.) Unpacking telnetd (from .../telnetd_0.17-29_arm.deb) ... Setting up telnetd (0.17-29) ... ude:~#動作確認のため、HD-HGLAN から telnet してみる
[yasunari@giga yasunari]$ telnet ude Trying 192.168.1.38... Connected to ude. Escape character is '^]'. telnetd: getpty: Permission denied . Connection closed by foreign host. [yasunari@giga yasunari]$debian は良く判らないので、google で検索。
ude:/etc# diff -c fstab.orig fstab *** fstab.orig Sat Sep 16 08:52:33 2006 --- fstab Sat Sep 16 08:52:37 2006 *************** *** 3,9 **** #これで telnet 可能に。/dev/sda2 / ext3 defaults,noatime,errors=remount-ro 0 0 proc /proc proc defaults 0 0 ! none /dev/pts devpts gid=5,mode=20 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sda1 /boot ext3 defaults,noatime 0 1 /dev/sda4 /mnt ext3 defaults,noatime 0 2 --- 3,9 ---- # /dev/sda2 / ext3 defaults,noatime,errors=remount-ro 0 0 proc /proc proc defaults 0 0 ! none /dev/pts devpts gid=103,mode=0622 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sda1 /boot ext3 defaults,noatime 0 1 /dev/sda4 /mnt ext3 defaults,noatime 0 2 ude:/etc#
[yasunari@giga yasunari]$ telnet ude Trying 192.168.1.38... Connected to ude. Escape character is '^]'. Debian GNU/Linux 3.1 ude ude login:でも、、、
ude login: root Login incorrect ude login: root Login incorrect ude login:root ではパスワードさえ聞いてくれない。
ude:/etc# groupadd yamasita ude:/etc# mkdir /home/yamasita ude:/etc# useradd -g yamasita -d /home/yamasita yasunari ude:/etc# passwd yasunari Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully ude:/etc#
[yasunari@giga yasunari]$ !tel telnet ude Trying 192.168.1.38... Connected to ude. Escape character is '^]'. Debian GNU/Linux 3.1 ude ude login: yasunari Password: Linux ude 2.6.12.6-arm1 #75 Sun Jun 11 14:33:24 JST 2006 armv5tejl GNU/Linux 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:~$
ude:~# apt-get install ftp Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: ftp 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. Need to get 55.3kB of archives. After unpacking 164kB of additional disk space will be used. Get:1 http://ftp.jp.debian.org sarge/main ftp 0.17-12 [55.3kB] Fetched 55.3kB in 1s (55.0kB/s) Selecting previously deselected package ftp. (Reading database ... 8999 files and directories currently installed.) Unpacking ftp (from .../archives/ftp_0.17-12_arm.deb) ... Setting up ftp (0.17-12) ... ude:~#
ude:/etc# apt-cache search ftpd : ftpd - FTP server ftpd-ssl - FTP server with SSL encryption support gforge-ftp-proftpd - Collaborative development tool - FTP management (using ProFTPd) : inetutils-ftpd - File Transfer Protocol server krb5-ftpd - Secure FTP server supporting MIT Kerberos muddleftpd - A flexible and efficient FTP daemon oftpd - Secure anonymous FTP server proftpd - Versatile, virtual-hosting FTP daemon proftpd-common - Versatile, virtual-hosting FTP daemon proftpd-doc - Versatile, virtual-hosting FTP daemon (Documentation) proftpd-ldap - Versatile, virtual-hosting FTP daemon (with LDAP support) proftpd-mysql - Versatile, virtual-hosting FTP daemon (with SQL support) proftpd-pgsql - Versatile, virtual-hosting FTP daemon (with SQL support) pure-ftpd - Pure-FTPd FTP server pure-ftpd-common - Pure-FTPd FTP server (Common Files) pure-ftpd-ldap - Pure-FTPd FTP server with LDAP user authentication pure-ftpd-mysql - Pure-FTPd FTP server with MySQL user authentication pure-ftpd-postgresql - Pure-FTPd FTP server with PostgreSQL user authentication pyftpd - ftp daemon with advanced features : twoftpd - a simple secure efficient FTP server (programs) twoftpd-run - a simple secure efficient FTP server vsftpd - The Very Secure FTP Daemon webmin-proftpd - Proftpd module for webmin webmin-wuftpd - wu-ftpd control module for webmin wu-ftpd - powerful and widely used FTP server wzdftpd - A portable, modular, not user-friendly ftp server wzdftpd-back-mysql - MySQL backend for wzdftpd wzdftpd-dev - Development files for wzdftpd wzdftpd-mod-perl - Perl module for wzdftpd wzdftpd-mod-tcl - TCL module for wzdftpd ude:/etc#いったいどれを使えばいいの?
ude:/etc# apt-get install inetutils-ftpd Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: inetutils-ftpd 0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded. Need to get 48.7kB of archives. After unpacking 131kB of additional disk space will be used. Get:1 http://ftp.jp.debian.org sarge/main inetutils-ftpd 2:1.4.2+20040207-4 [48.7kB] Fetched 48.7kB in 3s (15.6kB/s) Selecting previously deselected package inetutils-ftpd. (Reading database ... 9035 files and directories currently installed.) Unpacking inetutils-ftpd (from .../inetutils-ftpd_2%3a1.4.2+20040207-4_arm.deb) ... Setting up inetutils-ftpd (1.4.2+20040207-4) ... ude:/etc#接続してみる
ude:/etc# ftp localhost ftp: connect: Connection refused ftp> ude:/etc# ude:/etc# grep ftp /etc/inetd.conf #:BOOT: Tftp service is provided primarily for booting. Most sites ude:/etc# ls /sbin/ftp* ls: /sbin/ftp*: No such file or directory ude:/etc# ls /sbin/*ftp* ls: /sbin/*ftp*: No such file or directory ude:/etc# ls /usr/sbin/*ftp* /usr/sbin/ftpd ude:/etc#どうやって起動するの?
ude:~# tail -2 /etc/inetd.conf #:OTHER: Other services ftp stream tcp nowait root /usr/sbin/tcpd ftpd ude:~# ude:~# kill -HUP `cat /var/run/inetd.pid` ude:~# ftp localhost Connected to localhost. 220 ude FTP server (GNU inetutils 1.4.2) ready. Name (localhost:root): yasunari 331 Password required for yasunari. Password: 230- Linux ude 2.6.12.6-arm1 #75 Sun Jun 11 14:33:24 JST 2006 armv5tejl GNU/Linux 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> bye 221 Goodbye. ude:~#それなりに動いたが、正しい方法があるに違いない。
ude:/etc# apt-get install ntpd Reading Package Lists... Done Building Dependency Tree... Done E: Couldn't find package ntpdあれ?
ude:/etc# apt-get install ntp Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: libreadline4 perl perl-modules psmisc Suggested packages: ntpdate ntp-doc libterm-readline-gnu-perl libterm-readline-perl-perl Recommended packages: ntp-server perl-doc The following NEW packages will be installed: libreadline4 ntp perl perl-modules psmisc 0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded. Need to get 5751kB of archives. After unpacking 22.5MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://ftp.jp.debian.org sarge/main libreadline4 4.3-11 [138kB] : : Get:5 http://ftp.jp.debian.org sarge/main ntp 1:4.2.0a+stable-2sarge1 [257kB] Fetched 5751kB in 24s (237kB/s) Selecting previously deselected package libreadline4. (Reading database ... 7654 files and directories currently installed.) Unpacking libreadline4 (from .../libreadline4_4.3-11_arm.deb) ... Selecting previously deselected package perl-modules. Unpacking perl-modules (from .../perl-modules_5.8.4-8sarge5_all.deb) ... Selecting previously deselected package perl. Unpacking perl (from .../perl_5.8.4-8sarge5_arm.deb) ... Selecting previously deselected package psmisc. Unpacking psmisc (from .../archives/psmisc_21.5-1_arm.deb) ... Selecting previously deselected package ntp. Unpacking ntp (from .../ntp_1%3a4.2.0a+stable-2sarge1_arm.deb) ... Setting up libreadline4 (4.3-11) ... Setting up psmisc (21.5-1) ... Setting up perl-modules (5.8.4-8sarge5) ... Setting up ntp (4.2.0a+stable-2sarge1) ... Setting up perl (5.8.4-8sarge5) ... ude:/etc#ntp.conf は HD-HGLAN の Vine からもらってくる
ude:~# cd /etc ude:/etc# ftp giga Connected to giga.yamasita.jp. 220 ProFTPD 1.2.10 Server (ProFTPD Default Installation) [192.168.1.32] Name (giga:root): yasunari 331 Password required for yasunari. Password: 230 User yasunari logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> cd /etc/ 250 CWD command successful ftp> get ntp.conf local: ntp.conf remote: ntp.conf 200 PORT command successful 150 Opening BINARY mode data connection for ntp.conf (2005 bytes) 226 Transfer complete. 2005 bytes received in 0.00 secs (2361.9 kB/s) ftp> bye 221 Goodbye. ude:/etc#ntpd を起動する
ude:/etc# /etc/init.d/ntpd start -bash: /etc/init.d/ntpd: No such file or directoryあれ???
ude:/etc# apt-cache search ntp adjtimex - Utility to display or set the kernel time variables : ntp-server - Network Time Protocol: common server tools :ntp-server 入れなあかんのか。
ude:/etc# apt-get install ntp-server Reading Package Lists... Done Building Dependency Tree... Done The following extra packages will be installed: ntp-simple Suggested packages: ntpdate ntp-doc The following NEW packages will be installed: ntp-server ntp-simple 0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded. Need to get 159kB of archives. After unpacking 459kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://ftp.jp.debian.org sarge/main ntp-simple 1:4.2.0a+stable-2sarge1 [128kB] Get:2 http://ftp.jp.debian.org sarge/main ntp-server 1:4.2.0a+stable-2sarge1 [31.4kB] Fetched 159kB in 1s (105kB/s) Selecting previously deselected package ntp-simple. (Reading database ... 9010 files and directories currently installed.) Unpacking ntp-simple (from .../ntp-simple_1%3a4.2.0a+stable-2sarge1_arm.deb) ... Selecting previously deselected package ntp-server. Unpacking ntp-server (from .../ntp-server_1%3a4.2.0a+stable-2sarge1_arm.deb) ... Removing any system startup links for /etc/init.d/ntp-simple ... Removing any system startup links for /etc/init.d/ntp-refclock ... Removing any system startup links for /etc/init.d/ntp ... ntpd: no process killed Setting up ntp-simple (4.2.0a+stable-2sarge1) ... Setting up ntp-server (4.2.0a+stable-2sarge1) ... Configuration file `/etc/ntp.conf' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : background this process to examine the situation The default action is to keep your current version. *** ntp.conf (Y/I/N/O/D/Z) [default=N] ? y Installing new version of config file /etc/ntp.conf ... Starting NTP server: ntpd. ude:/etc# mv ntp.conf ntp.conf.orig ude:/etc# cp ntp.conf.orig ntp.conf ude:/etc# vi ntp.conf.dpkg-old ntp.conf ude:/etc# /etc/init.d/ntp-server start Starting NTP server: ntpd. ude:/etc#boot 時に自動起動するようにしたい。
ude:/etc# chkconfig -bash: chkconfig: command not found ude:/etc# apt-cache search chkconfig ude:/etc#debian でブート時に起動するようにするにはどうするの?
ude:/etc# ls */*ntp* cron.daily/ntp-server rc1.d/K23ntp-server rc5.d/S23ntp-server cron.weekly/ntp-server rc2.d/S23ntp-server rc6.d/K23ntp-server init.d/ntp-server rc3.d/S23ntp-server rc0.d/K23ntp-server rc4.d/S23ntp-server ude:/etc#すでに起動するようになっていた。宿題。
ude:/etc# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== ntp3.jst.mfeed. .INIT. 16 u - 64 0 0.000 0.000 4000.00 ntp2.jst.mfeed. .INIT. 16 u - 64 0 0.000 0.000 4000.00 ntp1.jst.mfeed. .INIT. 16 u - 64 0 0.000 0.000 4000.00 : :
あと何が要るかなぁ???
← LS-GL:debian:不要なパッケージの削除 |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ カルチャーショック |