로그인
Sign in
1. sunfreeware.com에서 O/S에 맞는 samba binary file을 down 받은후 pkgadd로 설치한다.

2. /etc/inet/inetd.conf 화일 입니다.

# SMB connections handled by Samba
swat stream tcp nowait root /opt/samba/bin/swat swat
netbios-ssn stream tcp nowait root /opt/samba/bin/smbd smbd
netbios-ns dgram udp wait root /opt/samba/bin/nmbd nmbd
bootps       dgram  udp wait   root /usr/sbin/bootpd   bootpd


3. /etc/services 화일 입니다.

swat                 901/tcp                         # Samba configuration tool
netbios-ssn     139/tcp                         # Samba
netbios-ns       137/udp                        # Samba

4. ps -ef | grep inetd

    root   144     1  0  11월 06 ?       14:25 /usr/sbin/inetd -s -t
    root  5210  5176  0 09:54:44 pts/1    0:00 grep inetd

    kill -HUP 144

5. PC에서  http://hostname:901



6.  sample smb.conf 화일 /opt/samba/lib/smb.conf

# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2001/07/13 11:47:19

# Global parameters
[global]
        workgroup = INITDATA
        netbios name = SHARK
        server string = Samba Server
        security = SHARE
        log file = /opt/samba/var/log.%m
        max log size = 50
        dns proxy = No

[sales]
        comment = sales
        path = /u01/init/sales
        guest ok = Yes
        writeable = Yes
        hosts allow = ALL

[bslee]
        comment = bslee
        path = /u01/init/bslee
        guest account = bslee
        writeable = Yes
        guest ok = Yes
        hosts allow = ALL

[tech]
        comment = technical support team
        path = /u01/init/tech
        guest account = tech
        writeable = Yes
        hosts allow = ALL

[yjlee]
        path = /u01/init/yjlee
        guest account = yjlee
        writeable = Yes
        guest ok = Yes
        hosts allow = ALL

[khseo]
        comment = khseo
        path = /u01/init/sales
        guest account = khseo
        writeable = Yes
        guest ok = Yes
        hosts allow = ALL

[mycroft]
        path = /u01/init/mycroft
        guest account = mycroft
        writeable = Yes
        guest ok = Yes
        hosts allow = ALL


7. sample samba 자동 실행 스크립트 /etc/init.d/samba, /etc/rc2.d/S99samba





#!/sbin/sh
#
# Start Samba SMB file/print services

# Set environment
PATH=/usr/bin:/sbin:/usr/sbin export PATH

# Samba directory
SAMBA_DIR=/opt/samba
SAMBA_SMBD_DEBUG_LEVEL=0
SAMBA_NMBD_DEBUG_LEVEL=0
SAMBA_SMBD_LOG=/var/opt/samba/log.smb
SAMBA_NMBD_LOG=/var/opt/samba/log.nmb

# Kill all processes matching a certain name
kill_proc () {
        ps -ef | grep "" | grep -v grep | while read PROC; do \
                PID=`echo ${PROC} | awk '{ print  }'`
                [ ${PID} -gt 0 ] && kill ${PID}
        done
}

case "" in
start)
        ${SAMBA_DIR}/bin/smbd -D -d ${SAMBA_SMBD_DEBUG_LEVEL:=0} \
                -l ${SAMBA_SMBD_LOG:=/var/opt/samba/log.smb}
        ${SAMBA_DIR}/bin/nmbd -D -d ${SAMBA_NMBD_DEBUG_LEVEL:=0} \
                -l ${SAMBA_NMBD_LOG:=/var/opt/samba/log.nmb}

        echo "Samba services started."
        ;;

stop)
        kill_proc "${SAMBA_DIR}/bin/nmbd"
        kill_proc "${SAMBA_DIR}/bin/smbd"

        echo "Samba services stopped."
        ;;

*)
        echo "Usage: {vContent} { start | stop }"
        exit 1
        ;;
esac

exit 0



조회 수 :
598
추천 수 :
24 / 0
등록일 :
2003.12.13
16:50:44 (*.193.52.140)
엮인글 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=2955&act=trackback&key=52e
게시글 주소 :
http://bestceok.com/xe/index.php?mid=sun_faq&document_srl=2955
List of Articles
번호 제목 글쓴이 날짜 조회 수
91 Solaris Network Installation (JumpStart) 하록 2003-12-13 492
90 Solaris Patch Install 하록 2003-12-13 473
89 디스크 관리하기.. 하록 2003-12-13 495
88 새 하드 디스크 추가 하록 2003-12-13 687
87 A5200을 다른 호스트로 옮길때 하록 2003-12-13 466
86 T3를 모니터링 방법(syslog) 하록 2003-12-13 493
85 T3 IP address setting 하록 2003-12-13 476
84 console login: ^J^M^Q^K^K^P 하록 2003-12-13 466
83 Hardware panic strings 하록 2003-12-13 757
82 Meta Device 복구하기 하록 2003-12-13 729
81 Slow all SCSI ports to asynchronous operation. 하록 2003-12-13 504
80 Troubleshooting System Hangs 하록 2003-12-13 671
79 SUN Fire X800 Firmware upgrade 하록 2003-12-13 887
78 Voulme manager 사용하는 A5x00 array disk fail시 disk 교체 방법 하록 2003-12-13 753
» samba 설치 하록 2003-12-13 598
76 사용자 추가 하록 2003-12-13 438
75 자동백업결과를 E-mail로 알려주는 스크립트 하록 2003-12-13 439
74 Anonymous FTP 서버 만들기 하록 2003-12-13 549
73 Ultra10에서 Seagate 40GB HDD(ST34082A)가 5.77GB로 인식될 때 하록 2003-12-13 677
72 crontab 사용법 하록 2003-12-13 547