|
Установка и конфигурирование Samba
Caanu iienai iie iiuo a
onoaiiaea e eiioeao?e?iaaiee Samba. ? iinoa?aeny iienaou ana i?ioaao?u aey
iieo?aiey ?aaioa?ueo eiioeao?aoee. Eiia?ii yoi ia - nei?aa
eioi?iaoey e ?aciuoeaie?. Aiiieieoaeuiia iienaiea iano?iae ii?ii iaeoe a
aieoiaioaoee, i?eeaaaaiie e enoiaiui oaenoai. Ia i?aoaiaoy ia aanie?oio?
enoeio, n iaoa?iaieai ?ao caia?aiee e iienaiey ioeaie, aiiouaiiuo iiie. Aoao ?aa
iaiaieaaouny iiuoii ii eiioeao?aoee Samba. I?eia?ii 2 aiaa iacaa y onoaiiaee iaoeio iia
Linux aey iaania?aiey ei?ii?aoeaiiai auoiaa a Internet. N?aco anoaea i?iaeaia
?aca?aiiai eiie?iaaiey. Aaei a oii, ?oi oaee-na?aa? n onoaiiaeaiiui no?eia?ii
?aaioae iia oi?aaeaieai Windows NT. Io?ii auei auae?aou: eneaou eeeaio NFS aey
Windows NT eee iuoaouny iaeoe a?oaie niinia. Oiaaa ?a y oneuoae iacaaiea Samba.
A e?ia 1998 iaoa
eiiiaiey eoieea naoaaie i?eioa? HP4000N. Na?aa?ii ia?aoe aue aua?ai PDC iia
WindowsNT3.51sp5. Windows 95 i?ae?anii ?aaioae n yoei i?eio-na?aa?ii, ii a naoe,
eae ia a?ao, auee aaa Windows NT 4.0 Workstation. Ii?ao auou ii iaciaie? (ia
aoia?, ?oi ana oae ieioi ia naiii aaea), ii a oa?aiea ianyoa, y aaconiaoii
iuoaeny iano?ieou ia?aou ec iia Windows NT Workstation 4.0sp3. Nenoaia oii?ii
o?aaiaaea iaee?ey a?aeaa?ia ia i?eio-na?aa?a. Ianeeuiay onoaiiaea naoaaiai
i?eioa?a aucuaaea caaenaiea nenoaiu. Onoaa io aaniieaciie o?aou ia?aia, y
iano?iee i?eio-na?aa? (eniieucoy Linux Slakware 3.5 e Samba 1.9p18-10). O?a
ianeieuei ianyoaa aanu ioen (i?eia?ii 30 eiiiu?oa?ia) i?ae?anii ia?aoaao
iacaaeneii io iia?aoeiiiie nenoaiu ia eiiiu?oa?a iieuciaaoaey. Oae eee eia?a, ii
aa?a eiiiu?oa?uee aie?ai eiiaaa ioauoaou eee i?inoi iiaieaou. I?ae?anii, anee ii
iaeaaaao noia?-eaaeeoeeaoeae e ainoaoi?ii no?ia, ?oiau aua?anne?iaaou
iieuciaaoaeae. Oiaaa iaei ?ac iano?iea nenoaio, ii ii?ao oaieuiyouny. Ii y e
oaeei ia ioiioonu; e oioae au eiaou aicii?iinou a?aiy io a?aiaie i?iaa?you
?aaioiniiniaiinou nenoaiu, iaoiaynu aia i?aaaeia ioena, e anee iaai, aiineou
eni?aaeaiey. Eae yoi naaeaou, anee ia na?aa?a noieo WindowsNT (e ia eniieuciaaou
Remote Access, ia oaiaii caiieou ia iiaai ec a?oaiai ai?iaa eee no?aiu ia?eia? -
aaau anou Internet)? Yoi i?ae?aniia ?aoaiea
iaoaeeeaaaony ia oeiainiaua o?oaiinoe. I?aiu o?oaii oaaaeou ia?aeunoai iio?aoeou
~900$ ia upgrade Windows NT3.51 ai Windows NT4.0 e aua? ?oou-?oou ia AddOn Pack
(ia ociaaae oi?ii, ii aoia? ia iaei), . I?e yoii io?ii o?eouaaou, ?oi a yoio eiiieaeo aoiaeo aaiii
oaeiaoa, ia?iee ii naoe ia?aaa?ony plain-text. I?e iaee?ee o ceioiuoeaiieea
caeioa?aniaaiiinoe e snifer ana aaoe ooeu?aiey ii aaciianiinoe aoaoo naaaaiu e
ioe?. Noieo ee ai?iaeou iai?ia, anee aicii?iinou oaaeaiiiai oi?aaeaiey aaaii
caei?aia ai ana UNIX-iiaiaiua nenoaiu, a ?acaeoea n?aanoa e?eioia?aoee iicaieyao
naiaiaii ?ani?ino?aiyaiui i?iaoeoai (y eia? a aeao ) iaania?eou aa?aioe? aeeoaeuiuo cao?ao
a?aiaie e iaoeiiuo ?ano?nia aey ?anoeo?iaee naoaaiai o?aoeea? Ii?ii auei
eniieuciaaou Samba, ii iaeucy i?aoiaiuoaou oaianoai Windows NT DOMAIN system
(iniaaiii anee ?aai?ea noaioee a naoe nieioiie Wintel). E aio iiyaeeanu Samba
2.0, n au? ia iieiie, ii ainoaoi?ii iiuiie iiaaa??eie WINDOWS NT DOMAIN. An?
ea?o e oiio, ?oi ana na?aa?u a iaoae eiiiaiee iinoaiaiii aoaoo ia?aaaaaiu ia
UNIX-iiaiaiua nenoaiu. I?ioo i?iuaiey ca noieu aieaia i?aaeneiaea. a) nicaaaaou oaee- e i?eio-na?aa?ia (aey eeeaioia iiaaa??eaa?ueo
iaio ec ?aaeecaoee i?ioieiea SMB) ia aaca ioe?uouo nenoai (OpenVMS, Digital
Unix, AIX, IRIX, HPUX, Solaris, FreeBSD, NetBSD, Linux, e o.a.); 1) ooieoee
ia?ae?iiai eiio?ieea?a NT DOMAIN (n iaeioi?uie ia?aie?aieyie, aieaa iia?iaii -
"NT DOMAIN support" ia naeoa 2) ooieoee o?anoieea NT DOMAIN; (n iaeioi?uie ia?aie?aieyie,
aieaa iia?iaii - "NT DOMAIN support" ia naeoa a) iaania?eaaou na?aenu WINS (eeeaio e na?aa?), TIME-server e
o.a. ; a) Linux-Samba - Primary DOMAIN
Controller n eeeaioaie Windows 9x, Windows NT 4.0; Oae?a
auee ?anniio?aiu neo?ae i?eiaiaiey encrypted e plain-text passwords e ii?iaiaaia
eiioeao?aoey n iiaaa??eie eaioe?iaaiey aeneia. Ia aaiiue iiiaio ii?iaiaaiiua
eiioeao?aoee eniieuco?ony a ?aaioa (oaee- e i?eio-na?aa?u). .
Naiinoiyoaeuii auee onoaiiaeaiu iineaaiea noaaeeuiua aa?nee aa?nee
noaiaa?oiie iinoaaee . Nenoaiu no?ieeenu n
eniieuciaaieai yaa? aa?nee . Iineaai?? aa?ne? ii?ii iieo?eou ia naeoa Ii?ii neiie?iaaou n , neiiieee?iaaiiua iia Aaoo nenoaio eee enoiaiua
oaenou. hostname:/usr/src# tar -xvzf samba-
2.0.4b.tar.gz hostname:/usr/src/samba-2.0.4b/source# ./configure --
prefix=/usr/local/samba --with-syslog Eiioeao?e?iaaiea e
nai?ea n iiaaa??eie hostname:/usr/src# tar -xvzf samba-
2.0.4b.targz hostname:/usr/src/samba-2.0.4b/source# ./configure --prefix=/usr/local/samba
--with-syslog --with-quota --
prefix=/usr/local/samba host:/usr/src/samba-2.0.4b/source#./configure --help more host:/usr/src/samba-2.0.4b/source#cp ../examples/smb.conf.default
/usr/local/samba/lib/smb.conf - a oaee /etc/inetd.conf aiaaaeyaouny no?iea:
- a
oaee /etc/services aiaaaeyaouny no?iea: . I?e
ia?auaiee e i?e iiiiue a?aoca?a, iinea aaaaaiey login
& password (root), Au iieo?aaoa web-eioa?oaen eiioeao?e?iaaiey Samba
(ianeieuei y cia? - aicii?ia ?aaioa n SSL). host:/usr/local/samba#ls -la drwxr-xr-x 2 root root
1024 Jun 10 09:31 bin drwxr-xr-x 5 root root 1024 May 12 21:16
swat total 3 drwxr-xr-x 2 root
root 1024 May 7 13:26 codepages Io?ii nicaaou ianeieuei
ae??aeoi?ee (aaiu iooe ii oiie?aie?, auai? inoa?ony ca Aaie - an? ii?ii iienaou
a host:/usr/local/samba/lib# chown root:root netlogon ; chmod 751
netlogon host:/usr/local/samba# chown root:root profiles ; chmod 751
profiles I?e eniieuciaaiee a ea?anoaa eeeaioia
Windows NT Workstation eee Windows 98, eiaao niune nicaaaaou [profiles] ia
eaioe?iaaiiii ?acaaea aenea. Windows 95 (aac aiiieieoaeuiuo i?aaie a Registry)
nio?aiyao a [profiles] oieuei user.dat Oae?a neaaoao ia?aoeou aieiaiea, ?oi
logon-scripts iaai nicaaaaou n eniieuciaaieai Dos- eee Windows- ?aaaeoi?a
oaenoa Neaaoao ii?aaaeeouny n oeiii security.
Oino, neiioeao?e?iaaiiue eae PDC, ian?o ooieoe? aaoi?ecaoee. Cia?aiey ee??a
[security] iiaoo i?eieiaou cia?aiey [share], [user], [server], [domain]. Aey
ea?aie ec ie?a i?eaaa?iiuo eiioeao?aoee ii?ii oeacaou ?acee?iue oei
[security]. Ee?? [encrypt password] ii?aaaeyao eaeie iaoaieci aaoi?ecaoee
aoaao aee??ai. Anee ee??o [encrypt password] i?enaiaii cia?aiea "No", oi
aaoi?ecaoey iieuciaaoaeae i?iecaiaeony enoiay ec o??oiuo caienae a . A yoii neo?aa, ia?iee i?a?aaa?ony ii naoe PlainText. Windows
95OSR2, Windows 98, Windows NT o?aao?o eciaiaiee a registry: [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP] [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\VNETSUP] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Rdr\Parameters] Ana
aaeuiaeoea eiioeao?aoee ?anniao?eaa?ouny aey cia?aiey ee??a I?e cia?aiee ee??a [encript passwords] = Yes ,
aaoi?ecaoey i?ioiaeo n eniieuciaaieai oaeea Ii oiie?aie?
einoaeyoeiiiue ne?eio ia nicaa?o private/smbpasswd. Aey aianaiey o??oiie caiene
iieuciaaoaey a oaee drwxr-xr-x 8 root root 1024 Jun 16
10:34 . drwxr-xr-x 3 root root 1024 May 10 17:24 lib drwxr-xr-x 3 root root 1024 May 7 14:27 var host:/usr/local/samba/private# chown root:root smbpasswd ; chmod 600
smbpasswd ; cd ../ Io?ii ioiaoeou, ?oi
oaeeu aie?iu niaa??aou o??oiua caiene
iieuciaaoaeae. I?e cia?aiee ee??a [encrypt password] = Yes , o??oiua caiene
iiaoo eiaou aea: username:*:10666:0:999
99:7::: host:~#/usr/local/samba/bin/smbpasswd -a user_name Retype New SMB password: 4. aeoeae?iaaou o??oio? caienu (ii oiie?aie?
aunoaaeyaony ee?? [account disabled]): Added interface ip=x.x.x.x broadcast=x.x.x.255
netmask=255.255.255.0 , aoiayuee a eiiieaeo
iinoaaee. host:~#cat /etc/passwd /usr/src/samba-
2.0.4b/source/script/mksmbpasswd.sh > \
I?eia? ?aai?ae eiioeao?aoee
Primary Domain Controller (eeeaiou Windows 9x):
workgroup = MYGROUP passwd program =
/usr/bin/passwd socket options = SO_KEEPALIVE
SO_BROADCAST TCP_NODELAY SO_RCVBUF=4096 SO_SNDBUF=4096
logon path = \\%N\Profiles\%U wins proxy =
Yes create mask = 0600 guest ok = No comment = Users'
Profiles path = /usr/pub host:~#/usr/local/samba/bin/nmbd -D -d2 e o.a), ii?ii iii?iaiaaou caeoe a naou. Aey nio?aiaiey iano?iae
host:~#cd
/usr/local/samba/profils host:/usr/local/samba/profiles#chown -R user_name:root user_name ;
chmod -R 751 user_name Anee a naoe anou eeeaiou Windows NT, iaiaoiaeii
i?iecaanoe iaeioi?ua eciaiaiey a eiioeao?aoee Samba. Oae?a noaioey n Windows NT,
aie?ia auou aee??aia a Samba DOMAIN, oi anou a . I?a?aa anaai nicaa?i Unix-o??oio?
caienu (aiinei iieuciaaoaey n user_name = [netbios_name aee??aaiie a NT DOMAIN
?aai?ae noaioee]+[$], ?oi-oi oeia User id fot
netbios_name [defaults to next available]: netbios_name$'s shell [/bin/bash]: Ok, I'm about to make a new account. Here's what you entered
so far: Home directory: /dev/null This is it... if you want to bail
it out, hit Control-C. Otherwise, press Enter the new value, or press return for the default Changing password for netbios_name Please use a combination of upper and lower case
letters and numbers. Re-enter new password: some_password_will_be_changed_to-"*-
in_shadow_files Neaao?oee oaa - aianaiea o??oiie caiene iaoeiu a
Added interface ip=x.x.x.x broadcast=x.x.x.255
netmask=255.255.255.0 Ia?aoeoa aieiaiea, ?oi eiay Unix-o??oio? caienu
I?eia? ?aai?ae eiioeao?aoee Primary Domain Controller
(eeeaiou Windows 9x / Windows NT): workgroup =
MYGROUP passwd program =
/usr/bin/passwd socket options = SO_KEEPALIVE
SO_BROADCAST TCP_NODELAY SO_RCVBUF=4096 SO_SNDBUF=4096
logon path = \\%N\Profiles\%U wins proxy =
Yes create mask = 0600 guest ok = No comment = Users'
Profiles path = /usr/pub host:~#/usr/local/samba/bin/nmbd -D -d2 Iinea yoiai neaaoao
noaiaa?oiay i?ioaao?a iiaee??aiey Windows NT Workstation e PDC. Ia?aa?o?aai
Windows NT - ii?ii iii?iaiaaou caeoe! . Ie?a i?eaaaaiu ?aai?ea eiioeao?aoee oaee- e
i?eio-na?aa?a (o?anoieeia NT DOMAIN). (ia?iee oeo?iaaiu e
i?iaa?y?ony ia oeacaiiii na?aa?a, auiieiy?uai ?ieu Primary DOMAIN
controller): workgroup = MYGROUP password server = ASERVER nt acl support = Yes socket options =
SO_KEEPALIVE SO_BROADCAST TCP_NODELAY SO_RCVBUF=4096 SO_SNDBUF=4096 dns proxy = No path
=/pub/ (ia?iee
oeo?iaaiu, e i?iaa?y?ony ia oeacaiiii na?aa?, auiieiy?uai ?ieu Primary DOMAIN
controller): [global] encrypt passwords = Yes log file
= /usr/local/samba/var/log.%U socket options = SO_KEEPALIVE
SO_BROADCAST TCP_NODELAY IPTOS_THROUGHPUT SO_RCVBUF=4096 SO_SNDBUF=4096 wide links = No lpq command = /usr/local/bin/lpq -
P%p print ok = Yes lpq command = /usr/local/bin/lpq -P%p path =
/usr/local/samba/spool/hp4000n print command = /usr/local/bin/lpr -h -r -P%p %s; rm %s comment = Tektronix 350 ext Aie?ia nouanoaiaaou Unix-o??oiay
caienu a aie?iu niaa??aou o??oiua caiene iieuciaaoaeae NT
Domain (ii?ii eniieuciaaou username.map).
username:*:10666:0:99999:7::
: nmbd , anee PDC -
Windows NT Server eee ?anniio?aiio? auoa i?ioaao?o). Nia?aea ia PDC aiaaaeyai
Samba-box. Aaeaa eniieucoai Added
interface ip=x.x.x.x broadcast=x.x.x.255 netmask=255.255.255.0 Joined domain MYGROUP. host:~#
| |