Sambaのインストール

  1. [Yast]-[ネットワークサービス]-[Sambaサーバ]を選択します
    smb1.png
  2. ワークグループ名を設定します
    smb2.png
  3. ドメインは作りません
    smb3.png
  4. とりあえず自動起動とファイアウォールの設定だけをして完了
    smb4.png

smb.confの設定

ここでは、必要最低限かつ十分なファイル共有サーバの設定をします。実行履歴を見れば明らかなように、Unixユーザのホームディレクトリと、共有ディレクトリ(/srv/ftp)を公開しているのみです。

> sudo /etc/samba/smb.conf
     1 # smb.conf is the main Samba configuration file. You find a full commented
     2 # version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
     3 # samba-doc package is installed.
     4 # Date: 2005-11-11
     5 [global]
     6         workgroup = HOMELAN
     7         server string = Samba %v on %h
     8         hosts allow = 192.168.1. 127.
     9
    10         unix charset = utf-8
    11         dos charset = cp932
    12         display charset = utf-8
    13         add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
    14         domain logons = No
    15         domain master = No
    16         security = user
    17         unix password sync = No
    18
    19 [homes]
    20         comment = Home Directories
    21         valid users = %S
    22         browseable = No
    23         read only = No
    24         writable = Yes
    25         inherit acls = Yes
    26
    27 [share]
    28         comment = Shared Directory
    29         path = /srv/ftp
    30         read only = No
    31         writable = Yes
    32         force user = root
    33
    34 ## Share disabled by YaST
    35 # [netlogon]
:wq

> sudo /etc/init.d/smb restart
Shutting down Samba SMB daemon       done
Starting Samba SMB daemon            done

Sambaユーザの追加

smbpasswdコマンドで、sambaユーザを追加します。sambaユーザに追加できるのはunixユーザのみです。

# smbpasswd --help
smbpasswd: invalid option -- -
When run by root:
    smbpasswd [options] [username]
otherwise:
    smbpasswd [options]

options:
  -L                   local mode (must be first option)
  -h                   print this usage message
  -s                   use stdin for password prompt
  -c smb.conf file     Use the given path to the smb.conf file
  -D LEVEL             debug level
  -r MACHINE           remote machine
  -U USER              remote username
extra options when run by root or in local mode:
  -a                   add user
  -d                   disable user
  -e                   enable user
  -i                   interdomain trust account
  -m                   machine trust account
  -n                   set no password
  -w PASSWORD          ldap admin password
  -x                   delete user
  -R ORDER             name resolve order
 
# smbpasswd -a ${user}

Suse 10 Server


添付ファイル: filesmb3.png 2258件 [詳細] filesmb4.png 2273件 [詳細] filesmb1.png 2220件 [詳細] filesmb2.png 2214件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2006-02-12 (日) 06:53:31 (6641d)
Short-URL: https://at-sushi.com:443/pukiwiki/index.php?cmd=s&k=6a0fb438a8
ISBN10
ISBN13
9784061426061