래드햇리눅스9.0(Redhat Linux 9.0)을 전체설치를 하면 아래처럼 rpm이 검색됩니다. 아래처럼 설치가 안되어 있다면, 다른 문서를 보시 설치하셔야 합니다.
[root@localhost root]# rpm -qa | grep samba
samba-swat-2.2.7a-7.9.0
samba-2.2.7a-7.9.0
redhat-config-samba-1.0.4-1
samba-common-2.2.7a-7.9.0
samba-client-2.2.7a-7.9.0
이제 삼바서버를 설정해합니다.
[root@localhost root]# vi /etc/samba/smb.conf
-----------------------------------------------------------------------------------------
17 # workgroup = NT-Domain-Name or Workgroup-Name
18 workgroup = MYGROUP #(윈도우 작업그룹을 연상하면 될듯. 수정가능.)
20 # server string is the equivalent of the NT Description field
21 server string = Samba Server #(내 네트워크 환경에서 설명 부분에 해당하는 부분 역시 맘대로 수적 가능.)
48 # Put a capping on the size of the log files (in Kb).
49 max log size = 0 #(삼바에 접속하는 컴퓨터에 대한 기록 파일의 최대 사이즈 '/var/log/samba/접속하는 컴퓨터 이름.log'란 파일에 각각 기록됨.)
51 # Security mode. Most people will want user level security. See
52 # security_level.txt for details.
53 security = user #(네트워크 자원 공유방식을 설정하는것 user는 사용자단위로, share는 자원 단위의 공유. 일반적으로는 share)
67 # You may wish to use password encryption. Please read
68 # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
69 # Do not enable this option unless you have read those documents
70 encrypt passwords = yes #(패스워드 관련 설정들.)
71 smb passwd file = /etc/samba/smbpasswd
111 # Most people will find that this option gives better performance.
112 # See speed.txt and the manual pages for details
113 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 #(접속을 담당하는 소켓에 대한 설정. TCP_NODELAY는 지연을 최소화 하는 옵션이고, SO_RCVBUF와 SO_SNDBUF는 보내고 받는 버퍼의 크기를 설정하는 옵션입니다.)
183 # Default case is normally upper case for all DOS files
184 ; default case = lower
185 # Be very careful with case sensitivity - it can break things!
186 ; case sensitive = no
187
188 #============================ Share Definitions ==============================
189 [homes]
190 comment = Home Directories
191 browseable = no #(윈도우 네트워크 브라우저에서 이공유 디렉토리를 보일 것인 지결정.)
192 writable = yes #(사용자에게 쓰기 권한 설정.)
193 valid users = %S
194 create mode = 0664
195 directory mode = 0775
#아래 부분은 원래 라인 번호와 조금 다를 것입니다. 아래의 수정된 옵션에서 3줄을 추가로 했던 설정 때문에 조금 밀렸습니다.
236 # A publicly accessible directory, but read only, except for people in
237 # the "staff" group
238 ;[public]
239 ; comment = Public Stuff
240 ; path = /home/samba #(삼바로 공유할 실제 공유 디렉토리)
241 ; public = yes #(일반 사용자들에게도 공유자원에 대한 접근 허용여부.)
242 ; writable = yes #(사용자에게 쓰기 권한 설정.)
243 ; printable = no
244 ; write list = @staff
-----------------------------------------------------------------------------------------
윗부분은 설정변경하기 전의 상태와 옵션에 대한 설명과 제가 변경한 설.
-----------------------------------------------------------------------------------------
17 # workgroup = NT-Domain-Name or Workgroup-Name
18 workgroup = WORKGRP
20 # server string is the equivalent of the NT Description field
21 server string = Samba Server(redhat_linux9)
48 # Put a capping on the size of the log files (in Kb).
49 max log size = 50
51 # Security mode. Most people will want user level security. See
52 # security_level.txt for details.
53 security = share
183 # Default case is normally upper case for all DOS files
184 ; default case = lower
185 # Be very careful with case sensitivity - it can break things!
186 ; case sensitive = no
187 mangle case = no
188 preserve case = yes
189 short preserve case = yes #( 윈도우와 리눅스사이에서 다른 파일 시스템 체계로 인한 문제가 안생기도록 설정하기 위해 추가한 부분. 대소문자 구분 문제등등.)
190 #============================ Share Definitions ==============================
191 [homes]
192 comment = Home Directories
193 browseable = no
194 writable = yes
195 valid users = %S
196 create mode = 0664
197 directory mode = 0775
237 # A publicly accessible directory, but read only, except for people in
238 # the "staff" group
239 [public]
240 comment = Public Stuff
241 path = /home/samba
242 public = yes
243 writable = yes
244 printable = no
245 write list = @staff #(주석을 제거 했음.)
-----------------------------------------------------------------------------------------
위의 주석을 제거한 [public]의 디렉토리 path가 없으면 아래처럼 만들어 줍니다.(설치후 그대로 라면 폴더가 없을 것입니다.)
[root@localhost root]# mkdir /home/samba
[root@localhost root]# ls /home/
samba
이제 아래처럼 명령어를 입력해서 삼바데몬(smb)을 시작합니다.
[root@localhost root]# /etc/init.d/smb start
SMB서비스를 시작하고 있습니다: [ 확인 ]
NMB서비스를 시작하고 있습니다: [ 확인 ]
[root@localhost root]# ps -aux | grep smb
root 2482 0.0 0.7 5784 2036 ? S 20:54 0:00 smbd -D
root 2494 0.0 0.2 4664 652 pts/0 S 20:55 0:00 grep smb
[root@localhost root]# ntsysv
위의 명령을 실행하면 아래와 같이 시작 프로그램을 설정하는 것이 나옵니다.

아래 처럼 'smb'를 스페이스바를 눌러 체크해주고 확인을 누릅니다.

이제 재부팅해도 삼바서버가 자동으로 작동할 것입니다.
윈도우에서 접속하는 방법은 '\\<삼바서버가 설치된 리눅스의 ip주소>'를 하시거나 처음 리눅스 설치시에 설정한 이름으로 접속할수 있습니다.('\\<리눅스 이름>')


0