smbd と nmbd が含まれます。
/etc/samba/smb.conf by plainly copying /usr/share/samba/smb.conf. So you should really run dpkg-reconfigure samba-common to adapt it:
FALCOTNET in our case).
wins server), the package also proposes identifying the WINS server from the information provided by the DHCP daemon. The Falcot Corp administrators rejected this option, since they intend to use the Samba server itself as the WINS server.
/etc/samba/smb.conf 設定ファイルに含まれる他のオプションを変更することが必要です。以下の抜粋は [global] セクションに対する変更点を要約したものです。
[...] [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = FALCOTNET [...] # Windows Internet Name Serving Support Section: # WINS Support - Tells the NMBD component of Samba to enable its WINS Server wins support = yes[...] ####### Authentication ####### # Server role. Defines in which mode Samba will operate. Possible # values are "standalone server", "member server", "classic primary # domain controller", "classic backup domain controller", "active # directory domain controller". # # Most people will want "standalone server" or "member server". # Running as "active directory domain controller" will require first # running "samba-tool domain provision" to wipe databases and create a # new domain. server role = standalone server obey pam restrictions = yes [...] # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. security = user
[...]
Indicates that Samba should act as a Netbios name server (WINS) for the local network. This option had been removed from the default configuration in Buster and must be added manually if desired.
| |
これは security パラメータのデフォルト値です。しかしながら、security パラメータは Samba 設定の要ですから、明示的に指定することをお勧めします。各ユーザは、共有の種類に関わらず必ず共有にアクセスする前に認証を必要とします。
|
adduser を使います)。
smbpasswd -a user コマンドを実行します。コマンドは対話的にパスワードを尋ねます。
smbpasswd -x user コマンドを実行します。Samba アカウントを一時的に利用できなくしたり (smbpasswd -d user を使います)、もう一度利用できるようにしたり (smbpasswd -e user を使います) することも可能です。
smbclient プログラムは SMB サーバに問い合わせを行います。特定のユーザ名を使ってサーバに接続するには -U user オプションを使います。smbclient //server/share はコマンドライン FTP クライアントに類似した対話的方法を使って共有にアクセスします。smbclient -L server は対象のサーバで利用できる (見える) 共有を全部リストします。
mount コマンドを使うことで、Windows 共有を Linux ファイルシステム階層にマウントすることが可能になります (cifs-utils の提供する mount.cifs の助けを借ります)。
/etc/smb-credentials ファイル (ユーザはこのファイルを読み込むことはできません) は以下の書式で書かれています。
username = user password = password
uid と gid を使うことで、マウントされたことで利用できるようになったファイルの所有者とグループを指定したものに強制することが可能になります。これを指定することで、root 以外のユーザもマウント先にアクセスできるようになります。
/etc/fstab の中に設定を書いて、Windows 共有をマウントすることも可能です。
//server/shared /shared cifs credentials=/etc/smb-credentials
umount command.
http://localhost:631/admin にアクセスします。
smb://user:password@server/printer