標準ファーム Ver.1.04 でハックキット(5)Windows 向けファイルサーバ

LS-HGL

標準ファーム 1.04 の LS-HGL に、 LS-HGL ハックキットをインストールする。

次は LS-GL/HS-DHGL ハックキット Windows 向けファイルサーバに準じて LS-HGL に Windows 向けファイルサーバを構築する。

samba のインストール

hackkit:~# apt-get install samba
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  libcupsys2 libkrb53 samba-common
Suggested packages:
  cupsys-common krb5-doc krb5-user
Recommended packages:
  smbldap-tools
The following NEW packages will be installed:
  libcupsys2 libkrb53 samba samba-common
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 6207kB of archives.
After unpacking 14.4MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp2.jp.debian.org etch/main libkrb53 1.4.4-7etch6 [390kB]
Get:2 http://ftp2.jp.debian.org proposed-updates/main libcupsys2 1.2.7-4etch4 [155kB]
Get:3 http://ftp2.jp.debian.org etch/main samba-common 3.0.24-6etch10 [2379kB]
	:
	:
Package configuration



 lqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqk
 x Please specify the workgroup you want this server to    x
 x appear to be in when queried by clients. Note that      x
 x this parameter also controls the domain name used with  x
 x the security=domain setting.                            x
 x                                                         x
 x Workgroup/Domain Name:                                  x
 x                                                         x
 x YAMASITA_______________________________________________ x
 x                                                         x
 x                                                     x
 x                                                         x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Package configuration

 lqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqk
 x                                                         x
 x All recent Windows clients communicate with SMB         x
 x servers using encrypted passwords. If you want to use   x
 x clear text passwords you will need to change a          x
 x parameter in your Windows registry.                     x
 x                                                         x
 x Enabling this option is highly recommended. If you do,  x
 x make sure you have a valid /etc/samba/smbpasswd file    x
 x and that you set passwords in there for each user       x
 x using the smbpasswd command.                            x
 x                                                         x
 x Use password encryption?                                x
 x                                                         x
 x                                                x
 x                                                         x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Package configuration

 lqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqk
 x                                                         x
 x If your computer gets IP address information from a     x
 x DHCP server on the network, the DHCP server may also    x
 x provide information about WINS servers ("NetBIOS name   x
 x servers") present on the network.  This requires a      x
 x change to your smb.conf file so that DHCP-provided      x
 x WINS settings will automatically be read from           x
 x /etc/samba/dhcp.conf.                                   x
 x                                                         x
 x The dhcp3-client package must be installed to take      x
 x advantage of this feature.                              x
 x                                                         x
 x                                                     x
 x                                                         x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Package configuration






     lqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqk
     x                                                  x
     x Modify smb.conf to use WINS settings from DHCP?  x
     x                                                  x
     x                                         x
     x                                                  x
     mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Package configuration


  lqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqk
  x The Samba daemon smbd can run as a normal daemon or   x
  x from inetd. Running as a daemon is the recommended    x
  x approach.                                             x
  x                                                       x
  x How do you want to run Samba?                         x
  x                                                       x
  x                        daemons                        x
  x                        inetd                          x
  x                                                       x
  x                                                       x
  x                                                   x
  x                                                       x
  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Package configuration

 lqqqqqqqqqqqqqqqqqqqqu Samba Server tqqqqqqqqqqqqqqqqqqqqqk
 x                                                         x
 x To be compatible with the defaults in most versions of
 x Windows, Samba must be configured to use encrypted
 x passwords.  This requires user passwords to be stored   a
 x in a file separate from /etc/passwd.  This file can be  a
 x created automatically, but the passwords must be added  a
 x manually by running smbpasswd and be kept up-to-date    a
 x in the future.                                          a
 x                                                         a
 x If you do not create it, you will have to reconfigure   a
 x Samba (and probably your client machines) to use        a
 x plaintext passwords.
 x
 x                         
 x                                                         x
 mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj

Package configuration





            lqqqqqqqqqu Samba Server tqqqqqqqqqqk
            x                                   x
            x Create samba password database,   x
            x /var/lib/samba/passdb.tdb?        x
            x                                   x
            x                          x
            x                                   x
            mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj


Selecting previously deselected package libkrb53.
(Reading database ... 11754 files and directories currently installed.)
Unpacking libkrb53 (from .../libkrb53_1.4.4-7etch6_arm.deb) ...
Selecting previously deselected package libcupsys2.
Unpacking libcupsys2 (from .../libcupsys2_1.2.7-4etch4_arm.deb) ...
Selecting previously deselected package samba-common.
Unpacking samba-common (from .../samba-common_3.0.24-6etch10_arm.deb) ...
Selecting previously deselected package samba.
Unpacking samba (from .../samba_3.0.24-6etch10_arm.deb) ...
Setting up libkrb53 (1.4.4-7etch6) ...

Setting up libcupsys2 (1.2.7-4etch4) ...

Setting up samba-common (3.0.24-6etch10) ...

Setting up samba (3.0.24-6etch10) ...
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 accout for root...ok
Importing accout for daemon...ok
Importing accout for bin...ok
Importing accout for sys...ok
Importing accout for sync...ok
Importing accout for games...ok
Importing accout for man...ok
Importing accout for lp...ok
Importing accout for mail...ok
Importing accout for news...ok
Importing accout for uucp...ok
Importing accout for proxy...ok
Importing accout for www-data...ok
Importing accout for backup...ok
Importing accout for list...ok
Importing accout for irc...ok
Importing accout for gnats...ok
Importing accout for nobody...ok
Importing accout for Debian-exim...ok
Importing accout for telnetd...ok
Importing accout for yasunari...ok
Importing accout for ntp...ok
Starting Samba daemons: nmbd smbd.

hackkit:~#
WORKGRUOP を指定した以外は、ずっとデフォルトのまま。

smb.conf の修正

hackkit:~# cd /etc/samba/
hackkit:/etc/samba# mv smb.conf smb.conf.orig
hackkit:/etc/samba# cp smb.conf.orig smb.conf
hackkit:/etc/samba# ls -l smb.conf*
-rw-r--r-- 1 root root 10577 Aug 16 11:21 smb.conf
-rw-r--r-- 1 root root 10577 Aug 16 11:19 smb.conf.orig
hackkit:/etc/samba# vi smb.conf
		:
		:
hackkit:/etc/samba# diff -c smb.conf.orig smb.conf
*** smb.conf.orig       Sat Aug 16 11:19:33 2008
--- smb.conf    Sat Aug 16 11:23:42 2008
***************
*** 303,305 ****
--- 303,310 ----
  ;   preexec = /bin/mount /cdrom
  ;   postexec = /bin/umount /cdrom

+ [hackkit]
+       comment = HS-DHGL share
+       path = /mnt
+       writable = Yes
+
hackkit:/etc/samba# /etc/init.d/samba reload
Reloading /etc/samba/smb.conf: smbd only.
hackkit:/etc/samba#

ユーザの作成

hackkit:/etc/samba# smbpasswd -a yasunari
New SMB password:
Retype new SMB password:
hackkit:/etc/samba#

共有ディレクトリの作成

/mnt/share を共有ディレクトリとして読み書き可能とする。
hackkit:/etc/samba# cd /mnt
hackkit:/mnt# mkdir share
hackkit:/mnt# chgrp yamasita share
hackkit:/mnt# chmod g+w share
hackkit:/mnt# ls -dl share
drwxrwxr-x 2 root yamasita 6 Aug 16 11:25 share
hackkit:/mnt#

確認

\\hackkit\hackkit にアクセスできることを確認する。



LS-H250GL
楽天市場
livedoor デパート
Sofmap
TSUKUMO ネットショップ
TWO TOP
Yahoo!ショッピング
パソQ
ムラウチドットコム
ヤマダ電機WEB
アット・ニフティストア icon
Joshin インターネットショッピング icon


標準ファーム Ver.1.04 でハックキット(4)時刻同期
ハックの記録
LinkStation/玄箱 をハックしよう

標準ファーム Ver.1.04 でハックキット(6)Windows 向けプリンタサーバ

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