значиццо начнемс.
Нужен простой файл сервак - в 2000 домене. Что бы опознавал пользователей и некоторым раздавал права на шары.
cat smb.conf
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]
log file = /var/log/samba/log.%m
nt acl support = yes
nt status support = yes
display charset = koi8-r
smb passwd file = /etc/samba/smbpasswd
load printers = no
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
socket address = 127.0.0.1 192.168.2.3
hosts allow = 127.0.0.1 192.168.2.0/255.255.255.0
hosts deny = ALL
map to guest = bad user
encrypt passwords = yes
winbind use default domain = yes
winbind separator = @
idmap uid = 10000-20000
idmap gid = 10000-20000
printer admin = @administrator
template shell = /bin/bash
dns proxy = no
netbios name = proxy
browse list = No
local master = No
prefered master = No
password server = pdc.domain.local
winbind enum users = yes
default = share
dos charset = 866
template homedir = /home/winnt/%D/%U
workgroup = DOMAIN
realm = DOMAIN.LOCAL
winbind enum groups = yes
os level = 35
security = ADS
preferred master = no
unix charset = koi8-r
max log size = 50
wins support = no
protocol = NT1
## =====================================
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
; print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
# This share is used for Windows NT-style point-and-print support.
# To be able to install drivers, you need to be either root, or listed
# in the printer admin parameter above. Note that you also need write access
# to the directory and share definition to be able to upload the drivers.
# For more information on this, please see the Printing Support Section of
# /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf
#
# A special case is using the CUPS Windows Postscript driver, which allows
# all features available via CUPS on the client, by publishing the ppd file
# and the cups driver by using the 'cupsaddsmb' tool. This requires the
# installation of the CUPS driver (
Как увидеть ссылки? | How to see hidden links?)
# on the server, but doesn't require you to use Windows at all
.
[share]
comment = Share
path = /share
create mask = 0755
browseable = yes
read list = DOMAIN@%u
write list = root DOMAIN@administrator DOMAIN@Group #(здесь перечисляем пользователей, которые могут писать в этой шаре)
force user = samba
force group = samba
=======================================================
в lmhosts должен быть указан PDC и линуксовый сервак.
типа
cat lmhosts
127.0.0.1 localhost.localdomain localhost
192.168.2.3 proxy.domain.local proxy #-эта запись самого сервака самба
192.168.2.251 pdc.domain.local dpc
=============================================
теперь Керберосс.
cat krb5.conf
[logging]
default = FILE:/var/log/kerberos/krb5libs.log
kdc = FILE:/var/log/kerberos/krb5kdc.log
admin_server = FILE:/var/log/kerberos/kadmind.log
[libdefaults]
default_realm = DOMAIN.LOCAL
dns_lookup_realm = false
dns_lookup_ldc = true
[realms]
DOMAIN.LOCAL = {
default_domain = domain.local
kdc = pdc.domain.local
# admin_server = pdc.DOMAIN.local
}
[domain_realm]
.domain.local = DOMAIN.LOCAL
domain.local = DOMAIN.LOCAL
[pam]
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
[login]
krb4_convert = true
krb4_get_tickets = false
================================================
Ну и не забываем еще про nsswitch
cat nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files winbind
shadow: files nisplus
group: files winbind
#hosts: db files nisplus nis dns
hosts: files dns winbind
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: nisplus
publickey: nisplus
automount: files nisplus
aliases: files nisplus
=================================================
теперь стартуем самбу.
делаем
kinit administrator@DOMAIN
Регистрация в домене самбы
net ads join -U Administrator
net rpc join -U Administrator
=================================================
проверяем
wbinfo -u
wbinfo -g
должен выдать список в первом случае всех пользователей домена
во втором случае - группы в домене
Вроде в принцыпи всё.
Дистрибутив Мандрива 2006.
Самбу беру из дистра.
rpm -qa | grep samba
samba-winbind-3.0.20-3mdk
samba-common-3.0.20-3mdk
samba-server-3.0.20-3mdk
samba-client-3.0.20-3mdk
rpm -qa | grep krb
krb5-workstation-1.4.2-1mdk #-обратите внимание на клиента кербероса, он не ставиццо по умолчанию, но он есть
libkrb53-1.4.2-1mdk