|
|
|
¸®´ª½ºÆÁ Go Unix Power Tools Online Book
Go Bash Guide
|
|
Read No. 178 article |
2002-10-30 06:42:08 |
|
|
|
|
NickName |
Ç®ºñ´© |
Subject |
»ï¹Ù ¼¹ö ¼³Á¤ |
|
|
http://support.mizi.com/Util_Html/dev_server/samba/
»ï¹Ù ¼¹ö ¼³Á¤
À©µµ¿ì¿Í ¸®´ª½º°£ÀÇ ½Ã½ºÅÛ °øÀ¯´Â »ï¹Ù¼³Á¤À» ÇÏ¿© °øÀ¯ÇÒ ¼ö ÀÖ½À´Ï´Ù ¹ÌÁö¸®´ª½º ±âº» CD
·Î ¼³Ä¡¸¦ Çϸé /etc/samba/smb.conf ¼³Á¤ ÆÄÀÏÀÌ ÀÖ½À´Ï´Ù.
»ï¹Ù ²Ù·¯¹Ì´Â samba-2.2.2-2mz.i586.rpm ÀÔ´Ï´Ù.
#cd /etc/samba/
#vi smb.conf ÇÏ¿© ÆÄÀÏÀ» ·çÆ®±ÇÇÑÀ¸·Î ¼öÁ¤ÇÏ¸é µË´Ï´Ù.
#======================= Global Settings =====================================
[global]
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = MIZI
: NT µµ¸ÞÀÎ À̸§ ¶Ç´Â ¿öÅ©±×·ì À̸§À» ³Ö¾îÁÖ¼¼¿ä.
# server string is the equivalent of the NT Description field
server string = sonya's Samba Server
: NT ¼³¸í Çʵå¿Í °°Àº°Í ÀÔ´Ï´Ù.
# client code paage (korean = 949)
client code page = 949
:ÇѱÛÀ» º¸¿©ÁÖ±â À§ÇÑ °ÍÀÔ´Ï´Ù.
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 192.168.1. 127.
:ÀÌ ¿É¼ÇÀº º¸¾È°ú °ü·ÃÇÏ¿© Áß¿äÇÑ °ÍÀÔ´Ï´Ù. ÀÌ ¿É¼ÇÀ» ÅëÇØ ¿©·¯ºÐÀÇ ±Ù°Å¸® ³×Æ®¿÷¿¡ ÀÖ
´Â È£½ºÆ®¿¡°Ô¸¸ Á¢±ÙÀ» Çã¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. ´ÙÀ½ ¿¹´Â 2 °³ÀÇ C Ŭ·¡½º ³×Æ®¿÷
°ú "loopback" ÀÎÅÍÆäÀ̽º¿¡ ´ëÇؼ¸¸ Á¢±ÙÀ» Çã¿ëÇÏ°í ÀÖ½À´Ï´Ù.
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; printcap name = /etc/printcap
load printers = yes
:ÇÁ¸°ÅÍ ¼³Á¤À» °³º°ÀûÀ¸·Î ÇÏÁö ¾Ê°í ÀÚµ¿À¸·Î ÇÁ¸°ÅÍ ¸ñ·ÏÀ» Æ÷ÇÔ½ÃÅ°±æ ¿øÇÑ´Ù¸é ´ÙÀ½ ¿É¼Ç
À» »ç¿ëÇÕ´Ï´Ù. printcap ¿¡¼ Á¤ÀÇÇÑ ÇÁ¸°ÅÍ ¸ñ·ÏÀÌ ÀÚµ¿À¸·Î µî·ÏµË´Ï´Ù. load printers =
no À̸é ÇϳªÇϳª Á¤ÇØÁÖ¼Å¾ß ÇÕ´Ï´Ù.
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
guest account = nobody
: ¼Õ´Ô »ç¿ëÀÚ¸¦ Çã°¡ÇÏ°í ½ÍÀ» ¶§´Â ´ÙÀ½ ÇàÀÇ ÁÖ¼®À» Ç®¾îÁÝ´Ï´Ù. nobody °¡ ¾Æ´Ñ °æ¿ì¿¡
´Â /etc/passwd Ç׸ñ¿¡ ¼³Á¤ÇÑ ¼Õ´Ô »ç¿ëÀÚ °èÁ¤À» Ãß°¡ ÇØ¾ß ÇÕ´Ï´Ù. useradd ¸í·ÉÀ¸·Î »ç¿ë
ÀÚ¸¦ ¸¸µå½Ê½Ã¿À.
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
:´ÙÀ½Àº »ï¹Ù·Î ÇÏ¿©±Ý Àڽſ¡ Á¢¼ÓÇϴ ȣ½ºÆ® º°·Î °³º°ÀûÀÎ ±â·Ï ÆÄÀÏÀ» ¸¸µéµµ·Ï Áö½ÃÇÕ´Ï
´Ù. "/var/log/samba/log.Á¢±ÙÈ£½ºÆ®À̸§"°ú °°Àº ÆÄÀϸíÀ» °¡Áý´Ï´Ù. %m Àº »ï¹Ù ¼³Á¤¿¡¼ »ç
¿ëµÇ´Â Ư¼öÇÑ º¯¼öÀÔ´Ï´Ù.
# Put a capping on the size of the log files (in Kb).
max log size = 50
: ·Î±× ÆÄÀÏ Å©±âÀÇ »óÇѼ±À» Kb ´ÜÀ§·Î ¼³Á¤ÇÕ´Ï´Ù.
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
:user´Â À¯´Ð½º °èÁ¤À̸§/Æнº¿öµå ¹æ½ÄÀÇ º¸¾È µî±ÞÀ̸ç share´Â ¿öÅ©±×·ì Æ÷ À©µµ¿ìÁî(WfW)
¿Í À©µµ95ÀÇ ±âº» ¸ðµåÀÔ´Ï´Ù. serverÀÇ °æ¿ì¿¡´Â ÀÎÁõÀ» À§ÇØ NT ¼¹ö°¡ ÇÊ¿äÇÕ´Ï´Ù. º¸¾È ¸ð
µåÀÔ´Ï´Ù. ´ëºÎºÐÀÇ »ç¶÷µé¿¡°Õ user ·¹º§ÀÇ º¸¾ÈÀÌ ¸Â½À´Ï´Ù.
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
null passwords = true
: Æнº¿öµå ¾Ïȣȸ¦ »ç¿ëÇÏ°í ½ÍÀ» ¶§°¡ ÀÖÀ» °Ì´Ï´Ù. »ï¹Ù ¹®¼ Áß¿¡¼ ENCRYPTION.txt,
Win95.txt, WinNT.txt ¸¦ ²À Àо½Ã±â ¹Ù¶ø´Ï´Ù. ÀÌ ¹®¼¸¦ Âø½ÇÈ÷ ÀÐÁö ¾ÊÀº »óÅ¿¡¼ ´Ù
À½ ¿É¼ÇÀ» ¼³Á¤ÇÏÁö ¸¶½Ê½Ã¿À. À©µµ¿ìÁîNT 4.0 ¼ºñ½º ÆÑ 3 ¹ø ÀÌ»óÀÎ ½Ã½ºÅÛ¿¡¼´Â Æнº¿öµå
¾ÏȣȰ¡ ÇÊ¿äÇÕ´Ï´Ù.
# Unix users can map to different SMB User names
username map = /etc/samba/smbusers
:À¯´Ð½º »ç¿ëÀÚ À̸§°ú SMB »ç¿ëÀÚ À̸§ÀÌ ´Þ¶ó µÑ °£ÀÇ ¿¬°ü Å×À̺íÀ» ÇÊ¿äÇÒ ¶§ »ç¿ëÇÕ´Ï
´Ù.
# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
: ´ëºÎºÐÀÇ °æ¿ì ´ÙÀ½ ¿É¼ÇÀ» ÁÖ¸é ¼º´É Çâ»ó È¿°ú¸¦ º¼ ¼ö ÀÖ½À´Ï´Ù. ÀÚ¼¼ÇÑ »çÇ×Àº
speed.txt ¿Í ¸Ç ÆäÀÌÁö¸¦ Âü°íÇϽʽÿÀ.
# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
interfaces = ¿©·¯ºÐÀÇ IP/24
:¿¹´Â »ï¹Ù ¼¹ö°¡ 192.168.12.2, 192.168.13.2 ÀÌ·¸°Ô µÎ °³ÀÇ ÁÖ¼Ò¸¦ °¡Áö°í ÀÖ°í 24 ºñÆ®
Áï ³Ý¸Å½ºÅ© 255.255.255.0 ¸¦ »ç¿ëÇÏ¿© 192.168.12.0, 192.168.13.0 ³×Æ®¿÷ÀÇ È£½ºÆ®¿¡ ´ëÇØ
¼ ¹Þ¾ÆµéÀÔ´Ï´Ù.
# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
; remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
remote announce = 192.168.1.255/MIZI
:Áö¿ªÀûÀÎ ¼ºê³Ý¿¡ ÀÚ±â ÀÚ½ÅÀ» °øÇ¥Çϵµ·Ï ¼³Á¤ÇÕ´Ï´Ù. À©µµ¿ìÁî ³×Æ®¿÷ ȯ°æ¿¡¼ »ï¹Ù ¼¹ö
°¡ Àß º¸À̵µ·Ï ÇÒ ¶§ À¯¿ëÇÕ´Ï´Ù.
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no
: DNS ÇÁ·Ï½Ã - »ï¹Ù·Î ÇÏ¿©±Ý DNS nslookup À» »ç¿ëÇÏ¿© NetBIOS À̸§À» ãÀ» °ÍÀÎÁö ¾Æ´ÑÁö
Áö½ÃÇÕ´Ï´Ù. 1.9.17 ¹öÀü¿¡¼´Â ³»ºÎ ±âº»°ªÀÌ yes ¿´À¸³ª 1.9.18 ¹öÀü¿¡¼´Â no ·Î º¯°æµÇ¾ú
½À´Ï´Ù.
# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
preserve case = yes
short preserve case = yes
:´ë¼Ò¹®ÀÚ º¸Á¸ÀÌ ÇÊ¿äÇÒ ¶§°¡ ÀÖ½À´Ï´Ù. ½Ã½ºÅÛ ±âº»°ªÀº NO ÀÔ´Ï´Ù. ÁÖÀÇ: °¢ °øÀ¯º°·Î ¼³Á¤
ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÇѱÛÀ» Á¦´ë·Î º¸±â À§Çؼ´Â ±¸º°ÇØ¾ß ÇÕ´Ï´Ù.
#============================ Share Definitions ==============================
[³ë·¡¸ðÀ½]
comment = ³ë·¡
path = /home/music
writable = yes
printable = no
create mode = 0750
invalid users = root
[¹®¼]
comment = ÀÚ·á¹æ
path = /¹®¼/
writable = yes
printable = no
create mode = 0750
invalid users = root
smb.conf ÆÄÀÏÀÇ ¼³Á¤ÀÌ ³¡³µ½À´Ï´Ù. ¼³Á¤ÀÌ ³¡³ ´ÙÀ½ »óŸ¦ È®ÀÎÇØ º¸¾Æ¾ß °ÚÁö¿ä.
# nmblookup sunwt
querying sunwt on xxx.xxx.xx.xxx
xxx.xxx.xx.xx sunwt<00>
À§ ó·³ ºñ½ÁÇÑ °á°ú °ªÀÌ È¸é¿¡ ³ª¿Í¾ß ÇÕ´Ï´Ù.
# testparm
À§ ¸í·ÉÀ¸·Î smb.conf ÀÇ ¼³Á¤À» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù
À§ ¿¹Áß »ç¿ëÀÚ¸¦ Ãß°¡ÇÑ °æ¿ì ¼³Á¤À» ÇÑ ´ÙÀ½ smbusers ÆÄÀÏÀ» ¿¾î »ç¿ëÀÚ ¸¦ Ãß°¡ÇØ ³ÖÀ¸¼Å
µµ µË´Ï´Ù.
#vi smbusers
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
user = sonya sunwt
ÇÑÅÒ¿¡¼ Ãß°¡ÇÑ »ç¿ëÀÚÀÇ »ï¹Ù ºñ¹Ð¹øÈ£¸¦ ¼³Á¤ÇØ ÁÖ¼¼¿ä.
#smbpasswd -a sunwt ¿£ÅÍ
New SMB password:
Retype new SMB password:
Added user sunwt.
* »ï¹Ù°¡ Á¦´ë·Î µ¿ÀÛÇÏÁö ¾ÊÀº °æ¿ì È®ÀÎÇغ¸¾ßÇÒ ÆÄÀÏ
vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.2 sunwt.mizi.com sunwt
vi /etc/hosts.allow
ALL:192.168.1.
vi /etc/hosts.deny
ALL: ALL¶ó°í µé¾î°¡ ³Ö¾îÁÖ¼¼¿ä.
¼³Á¤À» ³¡³½´ÙÀ½ µ¥¸óÀ» ¶ç¿öÁÖ¼Å¾ß ÇÕ´Ï´Ù.
#/etc/rc.d/init.d/smb stop
#/etc/rc.d/init.d/smb start ¶Ç´Â restart ÇÏ¸é µË´Ï´Ù.
ºÎÆýà »ï¹Ù µ¥¸óÀ» ÀÚµ¿À¸·Î ¼ºñ½º ÇØ ÁÖ·Á¸é kde ¸Þ´º - ±î¸£¸¶ - ¼ºñ½º ¼³Á¤ À¸·Î µé¾î
°¡ smb ¿¡ Ŭ¸¯ÇØ ÁÖ½Ã¸é µË´Ï´Ù.
swat À» ÀÌ¿ëÇÒ °æ¿ì ¾Æ·¡ ¿¡¼ Á÷Á¢ ¼öÁ¤ÇÏ¸é µË´Ï´Ù.
vi /etc/xinetd.d/swat
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
¼ºñ½º ¼³Á¤À» ³¡³ÂÀ»°æ¿ì xinetd µ¥¸óÀ» ´Ù½Ã ¶ç¿ì°í Å×½ºÆ® ÇØ º¸¼¼¿ä.
#/etc/rc.d/init.d/xinetd restart ÇÏ¸é µË´Ï´Ù.
ÄÈÄ¿¸¦ ¶ç¿ì½Ã°í, localhost:901 À» ÀÔ·ÂÇØ º¸½Ã¸é swat ÀÌ ¶å´Ï´Ù.
¸¶Âù°¡Áö·Î ºÎÆýà µ¥¸ó¼ºñ½º¸¦ ÀÚµ¿À¸·Î ½ÇÇàÇÒ °æ¿ì ¼ºñ½º ¼³Á¤¿¡¼ swat ¸¦ ¼±ÅÃÇØ ÁÖ¸é
µË´Ï´Ù.
swat ÀÌ ¾ÈµÉ¶§ È®ÀÎÇØ º¸¼Å¾ß ÇÏ´Â °ÍµéÀº /etc/servicesÆÄÀÏ¿¡ swat Æ÷Æ®°¡ ¿·Á ÀÖ´ÂÁö È®
ÀÎÇϼ¼¿ä
|
|
Page Loading [ 0.04 Sec ]
SQL Time [ 0 Sec ]
|
|
|