玄箱HGメモ / Debian / Samba導入


Last update: 2009-05-14 (木) 15:13:19
実施: 2008/12/18

玄箱HGメモ/Debian/Samba導入

緑文字が入力コマンド。


Debian Samba導入

NASサーバーとしてSambaを導入します。
管理者権限(管理者アカウント参照)で作業する必要があります。

Samba導入

KAGUYA:~# aptitude install samba[ENTER]

Samba導入画面(例)

Reading package lists... Done
Building dependency tree... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
Building tag database... Done
The following NEW packages will be automatically installed:
  libcompress-zlib-perl libconvert-asn1-perl libcrypt-smbhash-perl libcupsys2
  libdigest-md4-perl libdigest-sha1-perl libfont-afm-perl libhtml-format-perl
  libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libio-socket-ssl-perl
  libjcode-pm-perl libmailtools-perl libnet-ldap-perl libnet-ssleay-perl
  libtimedate-perl libunicode-map-perl libunicode-map8-perl libunicode-maputf8-perl
  libunicode-string-perl liburi-perl libwww-perl samba-common smbldap-tools
The following NEW packages will be installed:
  libcompress-zlib-perl libconvert-asn1-perl libcrypt-smbhash-perl libcupsys2
  libdigest-md4-perl libdigest-sha1-perl libfont-afm-perl libhtml-format-perl
  libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libio-socket-ssl-perl
  libjcode-pm-perl libmailtools-perl libnet-ldap-perl libnet-ssleay-perl
  libtimedate-perl libunicode-map-perl libunicode-map8-perl libunicode-maputf8-perl
  libunicode-string-perl liburi-perl libwww-perl samba samba-common smbldap-tools
0 packages upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 8997kB of archives. After unpacking 25.1MB will be used.
Do you want to continue? [Y/n/?] 

Y[ENTER]

Writing extended state information... Done
Get:1 ftp://ftp.dti.ad.jp stable/main libcompress-zlib-perl 1.42-2 [58.3kB]
Get:2 http://security.debian.org stable/updates/main libcupsys2 1.2.7-4etch6 [163kB]

  :  (省略)

Get:25 ftp://ftp.dti.ad.jp stable/main libcrypt-smbhash-perl 0.12-1 [13.8kB]
Get:26 ftp://ftp.dti.ad.jp stable/main smbldap-tools 0.9.2-3 [326kB]
Fetched 8997kB in 27s (330kB/s)
Preconfiguring packages ...
Package configuration

 +----------------------------------| Samba Server |-----------------------------------+~
 | Please specify the workgroup you want this server to appear to be in when queried   |
 | by clients. Note that this parameter also controls the domain name used with the    |
 | security=domain setting.                                                            |
 |                                                                                     |
 | Workgroup/Domain Name:                                                              |
 |                                                                                     |
 | BBSCINFO___________________________________________________________________________ |
 |                                                                                     |
 |                                       <Ok>                                          |
 |                                                                                     |
 +-------------------------------------------------------------------------------------+~

各環境のワークグループ名を入力します。
うちはBBSCINFOです。
エンターキーで決定です。

Package configuration

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

左右キーで選択してエンターキーで決定です。
ここはデフォルトのYesで…。

Package configuration

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

左右キーで選択してエンターキーで決定です。
デフォルトはNoだけどDHCP対応後なのでYesに変更します。
DHCP対応していなければ、デフォルトのNoで…。

Package configuration

 +--------------------------------| Samba Server |--------------------------------+~
 | The Samba daemon smbd can run as a normal daemon or from inetd. Running as a   |
 | daemon is the recommended approach.                                            |
 |                                                                                |
 | How do you want to run Samba?                                                  |
 |                                                                                |
 |                                    daemons                                     |
 |                                    inetd                                       |
 |                                                                                |
 |                                                                                |
 |                                     <Ok>                                       |
 |                                                                                |
 +--------------------------------------------------------------------------------+~

上下キーで選択してエンターキーで決定です。
ここはデフォルトのdaemonsで…。

Package configuration

 +----------------------------------| Samba Server |-----------------------------------+~
 |                                                                                     |
 | To be compatible with the defaults in most versions of Windows, Samba must be       |
 | configured to use encrypted passwords.  This requires user passwords to be stored   |
 | in a file separate from /etc/passwd.  This file can be created automatically, but   |
 | the passwords must be added manually by running smbpasswd and be kept up-to-date    |
 | in the future.                                                                      |
 |                                                                                     |
 | If you do not create it, you will have to reconfigure Samba (and probably your      |
 | client machines) to use plaintext passwords.                                        |
 |                                                                                     |
 | See /usr/share/doc/samba-doc/htmldocs/ENCRYPTION.html from the samba-doc package    |
 | for more details.                                                                   |
 |                                                                                     |
 | Create samba password database, /var/lib/samba/passdb.tdb?                          |
 |                                                                                     |
 |                        <Yes>                           <No>                         |
 |                                                                                     |
 +-------------------------------------------------------------------------------------+~

左右キーで選択してエンターキーで決定です。
ここはデフォルトのNoで…。

Selecting previously deselected package libcompress-zlib-perl.
(Reading database ... 11328 files and directories currently installed.)
Unpacking libcompress-zlib-perl (from .../libcompress-zlib-perl_1.42-2_powerpc.deb) ...
Selecting previously deselected package libconvert-asn1-perl.
Unpacking libconvert-asn1-perl (from .../libconvert-asn1-perl_0.20-1_all.deb) ...

  :  (省略)

Selecting previously deselected package samba.
Unpacking samba (from .../samba_3.0.24-6etch10_powerpc.deb) ...
Selecting previously deselected package libcrypt-smbhash-perl.
Unpacking libcrypt-smbhash-perl (from .../libcrypt-smbhash-perl_0.12-1_all.deb) ...
Selecting previously deselected package smbldap-tools.
Unpacking smbldap-tools (from .../smbldap-tools_0.9.2-3_all.deb) ...
Setting up libcompress-zlib-perl (1.42-2) ...
Setting up libconvert-asn1-perl (0.20-1) ...
Setting up libcupsys2 (1.2.7-4etch6) ...

Setting up libdigest-md4-perl (1.5-1) ...
Setting up libdigest-sha1-perl (2.11-1) ...
    :    (省略)
Setting up libunicode-maputf8-perl (1.11-2) ...
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 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 postgres...ok
Importing accout for www-data...ok
Importing accout for backup...ok
Importing accout for operator...ok
Importing accout for list...ok
Importing accout for irc...ok
Importing accout for gnats...ok
Importing accout for nobody...ok
Importing accout for hiro...ok
Importing accout for sshd...ok
Importing accout for proftpd...ok
Importing accout for ftp...ok
Importing accout for ntp...ok
Starting Samba daemons: nmbd smbd.

Setting up libcrypt-smbhash-perl (0.12-1) ...
Setting up smbldap-tools (0.9.2-3) ...

KAGUYA:~#

作業終了です。
以降の作業を行わない場合は管理者アカウント終了してtelnet切断します。


コメント

コメントはありません。 コメント/玄箱HGメモ/Debian/Samba導入?