:: 윈도우에서 리눅스 접근하기
첫번째 - 암호화 하지 않고 접근
레지스트리 수정 : [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanWorkStation\\Parameters
1로 수정`
[root@s92 linux]# vi /etc/samba/smb.conf
[GLOBAL]
workgroup = Sistsong # 윈도우 작업그룹
netbios name = leopit
server string = samba
log file = /var/log/samba/log.%m
max log size = 50 byte
security = user
encrypt passwords = no
socket options = TCP_NODELAY
dns proxy = No
[HOMES] #User\'s Home
comment = User\'s Home Directories
browseable = no
writable = yes
[root@s92 samba]# testparm
[root@s92 samba]# /etc/rc.d/init.d/smb start
두번째 - 암호화 하고 접근
레지스트리 수정 : [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\LanmanWorkStation\\Parameters
0으로 수정`
[root@s92 linux]# vi /etc/samba/smb.conf
encrypt passwords = yes 로 바꿈
[root@s92 linux]# cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
[root@s92 samba]# smbpasswd linux
New SMB password:
Retype new SMB password:
[root@s92 samba]# grep linux smbpasswd
linux:502:50831B500C427533AAD3B435B51404EE:F0873F3268072C7B1150B15670291137:[U ]:LCT-43850C6C:
[root@s92 samba]# testparm
[root@s92 samba]# service smb restart
:: 연결된 모습
[root@s92 samba]# netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:873 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 211.63.89.92:139 211.63.89.91:1102 SYN_RECV
tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 211.63.89.92:139 211.63.89.91:1114 ESTABLISHED
tcp 1 1 211.63.89.92:32954 205.156.51.200:80 LAST_ACK
tcp 0 0 :::22 :::* LISTEN
[root@s92 samba]# w
09:29:02 up 1:36, 2 users, load average: 0.02, 0.03, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root :0 - 07:53 ?xdm? 1:07 0.42s /usr/bin/gnome-session
root pts/1 :0.0 07:54 0.00s 0.05s 0.00s w
[root@s92 samba]# who
root :0 Nov 24 07:53
root pts/1 Nov 24 07:54 (:0.0)
[root@s92 samba]#
######################################################
:: 리눅스에서 윈도우로 접근하기
윈도우에 폴더 하나를 공유시키고 계정 하나를 만든다
mkdir /mnt/MS
nmblookup sist221
smbmount //sist221/Share /mnt/MS -o username=wind
######################################################
:: FTP 처럼 윈도우로 접속하기
[root@s92 /]# smbclient //sist221/Share -U wind
######################################################
:: 프로젝트 공간 할당하기
groupadd -g 50000 project
[root@s92 samba]# useradd pro -g project
[root@s92 samba]# grep project /etc/group
[root@s92 samba]# smbpasswd -a pro
[root@s92 samba]# mkdir -p /usr/samba/project
[root@s92 samba]# chown root.project /usr/samba/project
[root@s92 samba]# chmod 770 /usr/samba/project
[root@s92 samba]# vi /etc/samba/smb.conf
smb.conf에 다음과 같이 추가
[project]
comment = Project Directory
path = /usr/samba/project
public = no
writable = yes
write list = @project
######################################################
:: File Server 상에 공유디렉토리 만들기
[root@s92 samba]# cd /usr/samba
[root@s92 samba]# mkdir multimedia
[root@s92 samba]# chown pro /usr/samba/multimedia
[root@s92 samba]# vi /etc/samba/smb.conf
[root@s92 samba]# service smb restart
[MEDIA]
comment = Multimedia Files
path = /usr/samba/multimedia
public = yes
writable = yes
write list = pro
printable = no
create mask = 0755
######################################################
:: 삼바 웹에서 컨트럴 하기
[root@s92 xinetd.d]# 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
{
disable = no
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
}
[root@s92 xinetd.d]# service xinetd restart
http://localhost:901
'Server' 카테고리의 다른 글
sendmail.cf (0) | 2017.01.06 |
---|---|
네임서버 구축 (0) | 2017.01.06 |
/etc/passwd /etc/shadow 합치기/나누기 (0) | 2017.01.06 |
리눅스 계정 관리 (0) | 2017.01.06 |
grep (0) | 2017.01.06 |