SAMBA ( Windows 와 파일 및 프린트 공유 ) 설치 및 활용
작성자 정보
- 웹관리자 작성
- 작성일
컨텐츠 정보
- 6,924 조회
- 0 추천
- 목록
본문
삼바란 마이크로소프트웨어에서 개발한 윈도우운영체제(win 95/98/se/NT)등과의
한마디로 삼바는 유닉스와 유닉스뿐아니라 유닉스와 윈도우간의 훌륭한 자원공유 |


ㅇ 삼바구성요소
ㅇ 삼바 실행및 중지
ㅇ 확인방법 ps -ef | grep mbd 로 확인하면 "smbd -D"와 "nmbd -D" 데몬이 모두 뜨있어야 한다.
ㅇ samba사용자 등록하기 [sspark@ciss9 sspark]$ smbadduser 1) Updates /etc/smbpasswd smbadduser unixid:ntid unixid:ntid ... [root@ciss9 bin]# smbadduser sspark:prince Adding: sspark to /etc/smbpasswd
ㅇ samba 구성파일들 [root@ciss9 bin]# cd /etc -rw-r--r-- 1 root root 10702 Apr 16 13:53 smb.conf [root@ciss9 /etc]# ls -l smb* -rw-r--r-- 1 root root 10702 Apr 16 13:53 smb.conf [root@ciss9 /etc]# vi smbpasswd sspark:500:987D6C4BE229C052AAD3B435B51404EE:8C2A2BF5BBB
[root@ciss9 /etc]# vi smbusers # Unix_name = SMB_name1 SMB_name2 ...
ㅇ 실제 예 [root@ciss9 local]# id [root@ciss9 local]# cd /etc [root@ciss9 /etc]# cd rc.d [root@ciss9 rc.d]# ls -l [root@ciss9 rc.d]# cd init.d [root@ciss9 init.d]# ls -l [root@ciss9 init.d]# vi smb #!/bin/sh [root@ciss9 init.d]# [root@ciss9 init.d]# ls -l total 192 [root@ciss9 init.d]# [root@ciss9 init.d]# ps -ef | grep mbd root 6938 1 0 Aug06 ? 00:00:00 smbd -D [root@ciss9 init.d]# ./smb stop [root@ciss9 init.d]# ps -ef | grep mbd root 6927 6877 0 Aug06 pts/1 00:00:00 grep mbd [root@ciss9 init.d]# ./smb start Starting SMB services: [ OK ] [root@ciss9 init.d]# ./smb stop Shutting down SMB services: [ OK ] [root@ciss9 init.d]# ps -ef | grep mbd root 6938 1 0 Aug06 ? 00:00:00 smbd -D |


1. 삼바설치위치로 디렉토리로 이동
일반적으로 유닉스/리눅스에서 프로그램을 설치할 경우에는 /usr/local아래에 설치하게됩니다 따라서 여기서 설치하게될 삼바의 설치위치는 /usr/local/아래가 됩니다. [super@admin init.d]# cd /usr/local [super@admin local]# ls -l total 6104 drwxr-xr-x 13 root root 4096 Aug 2 11:56 apache |
2. samba 바이너리 가져오기
[super@admin local]# ftp ftp.samba.org
Connected to gorski.net.
220 valheru.gorski.net FTP server (Version wu-2.4.2-academ[BETA-15](1) Wed May .
Name (ftp.samba.org:sspark): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
230-The response '' is not valid
230-Next time please use your e-mail address as your password
230- for example: joe@168.126.72.51
230-Welcome, archive user! This is an experimental FTP server. If have any
230-unusual problems, please report them via e-mail to root@gorski.net
230-If you do have problems, please try using a dash (-) as the first character
230-of your password -- this will turn off the continuation messages that may
230-be confusing your ftp client.
230-
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 9
drwxr-xr-x 8 root wheel 1024 May 25 1998 .
drwxr-xr-x 8 root wheel 1024 May 25 1998 ..
drwxr-xr-x 2 root wheel 1024 Aug 12 1997 bin
drwxr-xr-x 2 root wheel 1024 Aug 12 1997 etc
drwxr-xr-x 2 root wheel 1024 Dec 3 1993 incoming
drwxr-xr-x 2 root wheel 1024 Nov 17 1993 lib
drwxr-xr-x 8 root wheel 1024 May 27 06:23 pub
drwxr-xr-x 3 root wheel 1024 Aug 12 1997 usr
-rw-r--r-- 1 root root 320 Jun 21 14:37 welcome.msg
226 Transfer complete.
ftp> cd pub
250 CWD command successful.
ftp> cd samba
250-See http://samba.org/ for a list of mirror sites
250-
250-Please read the file README
250- it was last modified on Tue Jul 20 21:23:31 1999 - 18 days ago
250 CWD command successful.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 2214
drwxr-xr-x 2 1015 users 1024 Aug 19 1997 pwdump
-rw-r--r-- 1 1015 users 2196946 Jul 22 02:16 samba-2.0.5a.tar.gz
lrwxrwxrwx 1 1015 users 19 Jul 22 02:40 samba-latest.tar.gz -> sz
drwxrwxr-x 2 1015 users 1024 Apr 19 01:16 slides
drwxrwxr-x 2 1015 users 1024 Aug 4 1998 smb2www
drwxr-xr-x 2 1015 users 1024 Jun 20 20:17 smbedit
drwxrwxr-x 2 1015 users 1024 Aug 19 1997 smblib
drwxr-xr-x 2 1015 users 1024 Dec 30 1997 snapshot
226 Transfer complete.
ftp> get samba-2.0.5a.tar.gz
local: samba-2.0.5a.tar.gz remote: samba-2.0.5a.tar.gz
200 PORT command successful.
150 Opening BINARY mode data connection for samba-2.0.5a.tar.gz (2196946 bytes).
226 Transfer complete.
2196946 bytes received in 38.2 secs (56 Kbytes/sec)
ftp> quit
221 Goodbye.
[super@admin local]# ls -l
total 8260
drwxr-xr-x 13 root root 4096 Aug 2 11:56 apache
drwxr-xr-x 2 root root 4096 Feb 7 1996 bin
drwxr-xr-x 2 root root 4096 Feb 7 1996 doc
drwxr-xr-x 2 root root 4096 Feb 7 1996 etc
drwxr-xr-x 2 root root 4096 Feb 7 1996 games
drwxr-xr-x 2 root root 4096 Feb 7 1996 info
drwxr-xr-x 2 root root 4096 Feb 7 1996 lib
drwxr-xr-x 12 root root 4096 Jun 15 04:03 man
-rw-r--r-- 1 root root 2196946 Aug 7 16:00 samba-2.0.5a.tar.gz
drwxr-xr-x 2 root root 4096 Feb 7 1996 sbin
drwxr-xr-x 2 root root 4096 Feb 7 1996 src
3. 파일 압축해제하기
[super@admin local]# tar xvfz samba-2.0.5a.tar.gz
samba-2.0.5a/
samba-2.0.5a/COPYING
samba-2.0.5a/docs/
samba-2.0.5a/docs/faq/
samba-2.0.5a/docs/faq/Samba-Server-FAQ-2.html
samba-2.0.5a/docs/faq/Samba-Server-FAQ-1.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ.txt
samba-2.0.5a/docs/faq/sambafaq-2.html
samba-2.0.5a/docs/faq/sambafaq-3.html
samba-2.0.5a/docs/faq/sambafaq-1.html
samba-2.0.5a/docs/faq/sambafaq-4.html
samba-2.0.5a/docs/faq/sambafaq-5.html
samba-2.0.5a/docs/faq/sambafaq.sgml
samba-2.0.5a/docs/faq/sambafaq.html
samba-2.0.5a/docs/faq/Samba-Server-FAQ.sgml
samba-2.0.5a/docs/faq/Samba-Server-FAQ.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ.sgml
samba-2.0.5a/docs/faq/Samba-meta-FAQ.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ-1.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ-2.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ-3.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ-4.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ-5.html
samba-2.0.5a/docs/faq/Samba-meta-FAQ-6.html
samba-2.0.5a/docs/faq/sambafaq.txt
samba-2.0.5a/docs/manpages/
samba-2.0.5a/docs/manpages/smb.conf.5
samba-2.0.5a/docs/manpages/smbrun.1
samba-2.0.5a/docs/manpages/smbsh.1
samba-2.0.5a/docs/manpages/make_smbcodepage.1
samba-2.0.5a/docs/manpages/testprns.1
samba-2.0.5a/docs/manpages/smbtar.1
samba-2.0.5a/docs/manpages/lmhosts.5
samba-2.0.5a/docs/manpages/nmblookup.1
samba-2.0.5a/docs/manpages/testparm.1
............ 생략
4. makefile 생성하기
[super@admin source]# ./configure
creating cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc -O ) works... yes
checking whether the C compiler (gcc -O ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for a BSD compatible install... /usr/bin/install -c
checking for gawk... gawk
checking whether gcc and cc understand -c and -o together... yes
checking that the C compiler understands volatile... yes
checking host system type... i686-unknown-linux
........ 생략
5. 컴파일하기(make)
[super@admin source]# make
Using FLAGS = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE64"
Using FLAGS32 = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE"
Compiling smbd/server.c
Compiling smbd/files.c
Compiling smbd/chgpasswd.c
Compiling smbd/connection.c
Compiling smbd/dfree.c
........ 생략 ..
6. 설치하기(make install)
make install(설치명령)을 한 후에 어느 디렉토리(/usr/local/samba)에 설치가 되는가와 어떤 것들이 설치되는가를 분명히 확인해야 한다.
[root@admin source]# make install
Using FLAGS = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE64"
Using FLAGS32 = -O -Iinclude -I./include -I./ubiqx -I./smbwrapper -D_LARGEFILE"
Using LIBS = -lreadline -ldl -lcrypt
/bin/sh ./install-sh -d -m 0755
7. samba 데몬 실행및 중지
[super@admin source]# cd /usr/local
[super@admin local]# ls -l
total 8268
drwxr-xr-x 13 root root 4096 Aug 2 11:56 apache
drwxr-xr-x 2 root root 4096 Feb 7 1996 bin
drwxr-xr-x 2 root root 4096 Feb 7 1996 doc
drwxr-xr-x 2 root root 4096 Feb 7 1996 etc
drwxr-xr-x 2 root root 4096 Feb 7 1996 games
drwxr-xr-x 2 root root 4096 Feb 7 1996 info
drwxr-xr-x 2 root root 4096 Feb 7 1996 lib
drwxr-xr-x 12 root root 4096 Jun 15 04:03 man
drwxr-xr-x 7 root root 4096 Aug 7 16:08 samba
drwxr-xr-x 7 1002 1002 4096 Jul 22 11:06 samba-2.0.5a
-rw-r--r-- 1 root root 2196946 Aug 7 16:00 samba-2.0.5a.tar.gz
drwxr-xr-x 2 root root 4096 Feb 7 1996 sbin
drwxr-xr-x 2 root root 4096 Feb 7 1996 src
[super@admin local]# cd samba
[super@admin samba]# ls -l
total 20
drwxr-xr-x 2 root root 4096 Aug 7 16:08 bin
drwxr-xr-x 3 root root 4096 Aug 7 16:08 lib
drwxr-xr-x 6 root root 4096 Aug 7 16:08 man
drwxr-xr-x 5 root root 4096 Aug 7 16:08 swat
drwxr-xr-x 2 root root 4096 Aug 7 16:08 var
[super@admin samba]# cd bin
[super@admin bin]# ps -ef | grep mbd
super 14409 6877 0 Aug06 pts/1 00:00:00 grep mbd
[super@admin bin]# ls -l
total 4520
-rwxr-xr-x 1 root root 1708 Aug 7 16:08 addtosmbpass
-rwxr-xr-x 1 root root 446 Aug 7 16:08 convert_smbpasswd
-rwxr-xr-x 1 root root 207877 Aug 7 16:08 make_printerdef
-rwxr-xr-x 1 root root 207134 Aug 7 16:08 make_smbcodepage
-rwxr-xr-x 1 root root 417592 Aug 7 16:08 nmbd
-rwxr-xr-x 1 root root 287274 Aug 7 16:08 nmblookup
-rwxr-xr-x 1 root root 527086 Aug 7 16:08 rpcclient
-rwxr-xr-x 1 root root 342472 Aug 7 16:08 smbclient
-rwxr-xr-x 1 root root 861199 Aug 7 16:08 smbd
-rwxr-xr-x 1 root root 489135 Aug 7 16:08 smbpasswd
-rwxr-xr-x 1 root root 229949 Aug 7 16:08 smbstatus
-rwxr-xr-x 1 root root 4862 Aug 7 16:08 smbtar
-rwxr-xr-x 1 root root 544738 Aug 7 16:08 swat
-rwxr-xr-x 1 root root 206715 Aug 7 16:08 testparm
-rwxr-xr-x 1 root root 217497 Aug 7 16:08 testprns
[super@admin bin]# nmbd -D
[super@admin bin]# smbd -D
[super@admin bin]# ps -ef | grep mbd
super 14412 1 0 Aug06 ? 00:00:00 nmbd -D
super 14414 1 0 Aug06 ? 00:00:00 smbd -D
super 14416 6877 0 Aug06 pts/1 00:00:00 grep mbd
관련자료
-
이전
-
다음