2台のUbuntu 14.04コンピューターをSamba経由で動作させることができません

2台のUbuntu 14.04コンピューターをSamba経由で動作させることができません

まず、プライマリ コンピュータは Ubuntu 14.04 ですが、Windows ラップトップも持っているため、Samba を使用しています。これらのラップトップはプライマリ データベースへの読み取りアクセス権を取得する必要があります。プライマリ データベースは、Ubuntu マシンの 1 つである「サーバー」上にあります。

次から次へと問題が起こってしまい、どうも解決できないようです。助けていただけるとありがたいです。

要件は次のとおりです。

- 共有/編集するデータベースは、Ubuntu マシンの 1 台 (ここでは「サーバー」と呼ぶ) の /home/valleysecurity/Documents/Shared/ にあります。このフォルダにはフォルダとファイルがあります。他のすべての Ubuntu マシンは「クライアント」と呼ぶことにします。
- すべての Ubuntu コンピュータには、admin、valleysecurity、technicalsupport という同じユーザーがいます。各ユーザーは、各コンピュータで同じ SID とパスワードを持っています。 - これらのユーザーだけが、ファイルとフォルダを編集/変更/修正できます。 - 新しいドキュメントまたはフォルダが作成されると、フォルダ階層の残りの部分と同じセキュリティ属性を持つ必要があります: ユーザー = {whoeverCreatedit}、グループ = valleygatehouse。 - 3 人のユーザーはすべて、グループ「valleygatehouse」に定義されています。
- すべてのコンピュータは、「valleygatehouse」というワークグループに属しています。

現在の問題:

クライアントから Valleygatehouse グループを見ることはできますが、グループをクリックするとパスワードの入力を求められます。この要求では、現在のユーザー ID がすでに入力されています。パスワードは受け入れられず、パスワードの入力が求められ続けます。どうすれば修正できますか?

注: Nautilus の組み込み機能を使用するか、Samba ユーザー インターフェイスを使用するか、.conf ファイルなどを編集するかについて、非常に混乱しています。これらは相反する目的に作用しているようです。さらに、「現在の」ドキュメントは命名規則に関してあちこちに散らばっています。たとえば、ユーザーを含めるための smbusers と users の違い、このファイルにすべてのユーザーとその他の情報を含めるか、それとも 1 人のユーザーだけを含めるかなどです。ああ!

PS: Nautilus を使用して、すべてのフォルダを変更し、Samba のゲストを許可し、「その他」の RW を許可することで、この問題を解消できます。ただし、これではセキュリティ要件に違反します。さらに、クライアントで新しいドキュメントを作成すると、そのユーザーは「nobody」で、グループは「nobody」になります。

そしてその時点で、smb.conf は何と関係があるのでしょうか?

サーバー smb.conf:


[global]

    workgroup = valleygatehouse
    server string = %h server (Samba, Ubuntu)
    server role = standalone server
    dns proxy = no
    name resolve order = lmhosts wins bcast host
    log file = /var/log/samba/log.%m
    max log size = 1000
    syslog = 0
    panic action = /usr/share/samba/panic-action %d
    encrypt passwords = no
;   passdb backend = tdbsam
;   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
;   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan  for
# sending the correct chat script for the passwd program in Debian Sarge).
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

    guest account = nobody
;   username map = /etc/samba/smbusers


[Shared]
    comment = Valley Security documents
    path = /home/valleysecurity/Documents/Shared
    browseable = yes
    guest ok = yes
    available = yes
    writeable = yes
    read only = no
    username = valleysecurity,admin,technicalsupport
    create mask = 0775
    directory mask = 0775
[printers]
    comment = All Printers
    browseable = yes
    path = /var/spool/samba
    printable = yes
    guest ok = yes
    read only = no
    create mask = 0700
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers
    browseable = yes
    writeable = yes
    read only = no

クライアント smb.conf


[global]
   workgroup = valleygatehouse
   server string = Samba Server
   server role = standalone server
   log file = /usr/local/samba/var/log.%m
   max log size = 50
   dns proxy = no 
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
[printers]
    comment = All Printers
    browseable = yes
    path = /var/spool/samba
    printable = yes
    guest ok = yes
    read only = no
    create mask = 0700
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers
    browseable = yes
    writeable = yes
    read only = no

答え1

使ってみる

valid users = valleysecurity,admin,technicalsupport

の代わりに

username = valleysecurity,admin,technicalsupport

ユーザー/パスワードが「サーバー」上に作成されていることを確認してください。

ユーザー フィールドを除いて、「サーバー側」の smb.conf と同様に構成されたマシンを実行しています。お役に立てば幸いです。

答え2

Linux で書き込み権限を持つ Samba サーバーをセットアップするたびに、コマンド「smbpasswd 'username'」を実行してユーザーを Samba ユーザーに追加します。ユーザーは最初にシステムに存在する必要があることに注意してください。

関連情報