smbd وnmbd.
dpkg-reconfigure samba-common لتعديله:
FALCOTNET في مثالنا).
/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 sever" 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 # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. security = user
[...]
adduser مثلاً).
smbpasswd -a user؛ سيطلب هذا الأمر إدخال كلمة السر.
smbpasswd -x user. كما يمكن تعطيل حسابات سامبا مؤقتاً (باستخدام smbpasswd -d user) وإعادة تفعيلها لاحقاً (باستخدام smbpasswd -e user).
smbclient عن مخدمات SMB. وهو يقبل الخيار -U user، للاتصال بالمخدم بالهوية المحددة. يتصل الأمر smbclient //server/share بالمشاركة بطريقة تفاعلية تشابه استخدام عميل FTP نصي. يسرد smbclient -L server جميع المشاركات المتاحة (والمرئية) على المخدم.
mount بربط مشاركة ويندوز مع شجرة نظام ملفات لينكس (بمساعدة الأمر mount.cifs المتوفر في cifs-utils).
مثال 11.24. ربط مشاركات ويندوز
mount -t cifs //arrakis/shared /shared \
-o credentials=/etc/smb-credentials/etc/smb-credentials (الذي يجب ألا تعطى صلاحية قراءته للمستخدمين) كالتالي:
username = user password = password
uid وgid اللذان يسمحان بفرض مالك ومجموعة للملفات المتاحة على المشاركة، حتى لا تنحصر صلاحيات الوصول بالمستخدم الجذر.
/etc/fstab:
//server/shared /shared cifs credentials=/etc/smb-credentials
umount القياسي.
http://localhost:631/admin
smb://user:password@server/printer.