Für einen Server sind File-Dienste von zentraler Bedeutung. Auch unter Linux ist dafür das SMB-Protokoll weit verbreitet, da es einen Austausch mit Windows-Rechnern erlaubt. nachinstallieren muss man dazu das Paket samba.

Konfiguriert wird Samba über die Datei /etc/samba/smb.conf. Man muss einfach die vorhandene Datei an die eigene Situation anpassen.

[global]
workgroup = ARBEITSGRUPPE
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = Z:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = Yes
domain master = Yes
local master = Yes
os level = 65
preferred master = Yes
security = user

server string = %L
username map = /etc/samba/smbusers
username level = 5

log level = 1
syslog = 0
log file = /var/log/samba/log.%m
max log size = 10000
time server = Yes
wins support = Yes
encrypt passwords = true
logon script = scripts\%a.bat
add user script = /usr/sbin/useradd -m %u
add group script = /usr/sbin/groupadd "%g"
add user to group script = /usr/sbin/groupmod -A "%u" "%g"
delete user from group script = /usr/sbin/groupmod -R "%u" "%g"
set primary group script = /usr/sbin/usermod -g "%g" "%u"
unix password sync = True
passwd program = /usr/bin/passwd %u
pam password change = True
deadtime = 15
profile acls = Yes

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
wide links = no
preexec = echo "%u connected to %S from %m %I mit Typ %a" >> /tmp/log

[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/

[goups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
[netlogon]
comment = Network Logon Service
path = /home/dos/netlogon
read only = yes
write list = @ntadmin root @admin
force group = ntadmin
create mask = 0664
directory mask = 0775

[profiles]
path = %H
read only = no
inherit permissions = Yes
store dos attributes = Yes
create mask = 0600
directory mask = 0700

[cdrom]
comment = CD-ROM drive des Linuxservers
browsable = yes
available = yes
public = yes
writable = no
path = /media/dvdrecorder
locking = no

Die angegebene Datei smbusers ist für die Zuordnung zwischen Linux- und Windows-Namen zuständig:

# This file allows you to map usernames from the clients to the server.
# Unix_name = SMB_name1 SMB_name2 ...
#
# See section 'username map' in the manual page of smb.conf for more
# information.
#
# This file is _not_ included in the default configuration as it makes the
# usage of an user named administrator impossible.

root = administrator
;nobody = guest pcguest smbguest

Im gleichen Verzeichnis liegt auch die Datei smbpasswd, die Passwortdatenbank von Samba.

Weitere Informationen unter http://www.linuxbu.ch/pdf6/kapitel09.pdf
und http://wiki.ubuntuusers.de/Samba

Kommentare sind geschlossen.