|
|
|
리눅스팁 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 ]
|
|
|