Skip to content

CentOS Samba 설정

조회 수 24937 추천 수 0 2010.11.08 17:19:19

1. 삼바 설치 확인

[root@localhost ~]# rpm -qa | grep samba

system-config-samba-1.2.39-1.el5

samba-3.0.28-0.el5.8

samba-client-3.0.28-0.el5.8

samba-common-3.0.28-0.el5.8

설치되어 있지 않을 경우

[root@localhost ~]# yum install -y samba

2. 삼바 환경설정

삼바 환경설정 파일인 smb.conf 파일 수정

[root@localhost ~]# cd /etc/samba

[root@localhost samba]# vi smb.conf

# ----------------------- Network Related Options -------------------------

#

# workgroup = Workgroup

#

# server string is the equivalent of the NT Description field

#

# netbios name can be used to specify a server name not tied to the hostname

#

# Interfaces lets you configure Samba to use multiple interfaces

# If you have multiple network interfaces then you can list the ones

# you want to listen on (never omit localhost)

#

# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can

# specifiy it as a per share option as well

#

unix charset = cp949

dos charset = cp949

display charset = cp949

리눅스와 윈도우즈간의 언어셋 설정.

workgroup = MYGROUP

윈도우즈의 작업그룹명. ip 대역으로 접속시에는 아무거나 해도 상관없다.

server string = Samba Server Version %v

윈도우즈에서 접속시에 보여지는 서버이름.

네트워크 드라이브로 연결시에는 위의 서버명과 디렉토리명이 같이 표시되기 때문에 적절히 수정.

;       netbios name = local_CentOS

;       interfaces = lo eth0 192.168.1.2/24 192.168.2.13/24

hosts allow = 192.168.1.5 123.45.6.

삼바서버에 접속할 수 있는 클라이언트 IP 대역 설정.

(위의 경우 192.168.1.5 IP와 123.45.6. IP 대역에 대해 접속을 허용)

# ----------------------- Standalone Server Options ------------------------

#

# Security can be set to user, share(deprecated) or server(deprecated)

#

# Backend to store user information in. New installations should

# use either tdbsam or ldapsam. smbpasswd is available for backwards

# compatibility. tdbsam requires no further configuration.

security = user

passdb backend = tdbsam

security = share (삼바서버에 사용자명/패스워드 인증없이 접속 가능)

security = user (리눅스 계정 아이디로 접속 가능)

user로 설정했을 경우, 환경설정 저장 후 리눅스 계정 패스워드와는 별도로 삼바서버에 패스워드를 등록해야 한다.

#============================ Share Definitions ==============================

[homes]

comment = Home Directories

browseable = no

writable = yes

;       valid users = %S

;       valid users = MYDOMAIN\%S

삼바서버에 로그인한 사용자의 홈디렉토리 설정.

security = user로 설정되어 있을 경우, 로그인한 사용자의 디렉토리가 표시된다.

[test1_share]

comment = test1_share

path = /home/test

writable = yes

valid users = test1

로그인한 사용자에게 홈디렉토리 이외에 공유할 디렉토리를 설정해줄 수 있다.

위의 경우, "test1" 사용자에게 자신의 디렉토리 이외에 "/home/test" 디렉토리도 공유할 수 있게 해준다.

3. 삼바 서비스 시작

[root@localhost samba]# service smb start

SMB서비스를 시작 중:                                       [  OK  ]

NMB서비스를 시작 중:                                       [  OK  ]

4. 윈도우즈에서 삼바 접속

시작 > 실행 > \\삼바 서버 IP

5. 삼바 서버에서 사용할 계정 패스워드 설정

[root@localhost samba]# smbpasswd -a test1

New SMB password:

Retype new SMB password:

Added user test1.

smbpasswd -a test1 : test1 사용자의 삼바용 패스워드 추가

smbpasswd -x test1 : test1 사용자의 삼바 계정 삭제

smbpasswd -d test1 : test1 사용자의 삼바 계정을 사용중지

profile

일요일은 짜빠게뤼~ 먹는날~^^

엮인글 :
http://adminplay.com/28757/2b8/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
367 도메인 Status 상태별 설명 안내 ADMINPLAY 2012-12-28 4892
366 HDD Guardian (a graphical user interface for smartctl) ADMINPLAY 2013-09-22 4998
365 dpkg 사용법 ADMINPLAY 2013-04-03 5009
364 top 화면 내용중 load average와 PRI : priority(우선순위... ADMINPLAY 2013-12-24 5200
363 ubuntu 10.04 에서 Nginx, Mysql, PHP5 ADMINPLAY 2013-02-28 5237
362 HP 서버 disk 증설 (hpacucli 사용) ADMINPLAY 2015-08-05 5238
361 리눅스 메모리 관리, 왜 메모리 여유공간이 없을까? (top ... ADMINPLAY 2013-04-25 5298
360 windows smartctl ADMINPLAY 2013-09-22 5328
359 ZFS 파일에 ACL 설정 ADMINPLAY 2014-02-03 5336
358 make 정리 ADMINPLAY 2013-05-12 5340
357 SSL 패스워드 삭제 하기 ADMINPLAY 2014-04-27 5443
356 EXT4 파일 시스템을 Btrfs 파일 시스템으로 변환하기 ADMINPLAY 2015-07-07 5453
355 tar 압축을 실수로 디렉토리 생성 안하고 풀었을때 대처법 ADMINPLAY 2013-09-22 5462
354 ll 명령시 날짜 전체가 보이도록 하기 ADMINPLAY 2014-01-02 5481
353 hddtemp와 mrtg를 이용한 하드디스크 온도 체크 file ADMINPLAY 2013-12-19 5514
352 python과 mysql 연동시 libmysqlclient_r.so.* 에러가 날 ... ADMINPLAY 2014-03-27 5592
351 linux 커널 파라메터 수정 ADMINPLAY 2013-05-12 5613
350 우분투(Ubuntu) ssh 설정하기 ADMINPLAY 2013-02-27 5664
349 error: Hm, kex protocol error: type 30 seq 1 [preauth]... file ADMINPLAY 2016-05-20 5665
348 운영중인 Linux 서버에서 NTFS 파일 시스템 삭제하기 ADMINPLAY 2013-01-16 5734

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234