このチュートリアルでは、Debian EtchへのSambaファイルサーバーのインストールと、SMBプロトコルを介してファイルを共有するようにサーバーを構成する方法とユーザーを追加する方法について説明します。 Sambaは、ドメインコントローラーとしてではなく、スタンドアロンサーバーとして構成されます。 Sambaをドメインコントローラーとして構成するには、次のハウツーを参照してください:https://www.howtoforge.com/samba_domaincontroller_setup_ubuntu_6.10
結果のセットアップでは、すべてのユーザーがSMBプロトコルを介してアクセスできる独自のホームディレクトリを持ち、すべてのユーザーが読み取り/書き込みアクセス権を持つ共有ディレクトリを持っています。
Sambaのインストール
Debian Sambaパッケージをインストールします:
apt-get install libcupsys2 samba samba-common
次の質問に答えてください:
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:
->ワークグループ
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?
->いいえ
smb.confファイルを編集します:
vi /etc/samba/smb.conf
グローバルセクションで、「;」を削除します最前線のsecurity=userなので、次のようになります。
security = user
LinuxシステムユーザーがSambaサーバーにログインできるようにします。
[ホーム]セクションで、書き込み可能=いいえを次のように変更します:
writable = yes
ファイルを閉じてSambaを再起動します:
/etc/init.d/samba restart
次に、すべてのユーザーがアクセスできる共有を追加します。
ファイルを共有するためのディレクトリを作成し、所有者をユーザーグループに変更します。
mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/
ファイル/etc/samba/smb.confの最後に、次の行を追加します。
[allusers] comment = All Users path = /home/shares/allusers valid users = @users force group = users create mask = 0660 directory mask = 0771 writable = yes
次に、Sambaを再起動します:
/etc/init.d/samba restart
この例では、tomという名前のユーザーを追加します。同じ方法で必要な数のユーザーを追加できます。コマンドでユーザー名tomを目的のユーザー名に置き換えるだけです。
useradd tom -m -G users
次に、ユーザーをSambaユーザーデータベースに追加します。
smbpasswd -a tom
->新しいユーザーのパスワードを入力してください
これで、ユーザー名tomと選択したパスワードを使用してファイルエクスプローラーでWindowsワークステーションからログインし、Linuxサーバーのtomのホームディレクトリまたはパブリック共有ディレクトリにファイルを保存できるようになります。
- http://www.debian.org
- http://www.samba.org