a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 115|回复: 0

[红帽认证] linux红帽认证:Linux与Windows共享文件SAMBA

[复制链接]
发表于 2012-8-4 12:19:50 | 显示全部楼层 |阅读模式
 a )先配置/etc/samba/smb.conf   cat /etc/samba/smb.conf < [global]; w9 e4 y3 p$ f+ {
  workgroup = linuxgroup& ~2 L& D$ @' S# e
  server string = linux-smb6 s6 {% M/ J0 ]8 f
  dos charset = cp936
( v# [0 X5 B. r$ N- {" @5 J0 |  unix charset = utf8中 华 考 试 网8 ?+ U2 [  x  w* `6 r6 |" R
  hosts allow = 192.168.1. #允许的连接的IP段,这里要注意一下; _  N/ v' K0 Y
  log file = /var/log/samba/%m.log
8 i4 g5 `& L+ u# d$ S  e* n3 q  max log size = 50
; Q5 x: ~) `# v  socket options = TCP_NODELAY
8 J9 j3 u7 E+ Q- |" `6 o8 Z* B  security = user
+ W: A5 t8 c8 u2 l; ~* z  encrypt passwords = yes) e# V3 m& T. _/ w: M4 @
  smb passwd file = /etc/samba/smbpasswd. B7 V' q2 H7 {. l" g* O& A
  username map = /etc/samba/smbuserswww.Examw.com
/ s0 b/ v- }' W& J  dns proxy = no* U% [6 i' S" _0 D2 B- S' b# L
  [share]
* }% `+ ]  G2 L. R8 F& }  path = /mnt/share/7 u& t) N9 g! d. r
  ;guest ok = yes2 W5 t& i% |1 ?1 D; f& v5 f
  browseable = yes8 b- [4 ]# F- a: l6 f* q' {( s
  create mask = 0755
& a8 ~( p9 [4 [& M# @( K  writeable = yes4 I1 J  U# ^* c  o3 Z9 A4 S* j
  EOF
/ a# n" G* V9 I$ x1 O+ L( e, A  b )创建smbpasswd 文件,并添加用户/ k- a2 D/ D' v% ?2 o  N
  cat /etc/passwd | mksmbpasswd.awk > /etc/samba/smbpasswd
2 m5 w" q" A# P! y  ~  smbpasswd -ae $USER
7 @! c7 N. l9 W* ]7 D* ]* q  其中mksmbpasswd.awk 脚本在samba 源码包的某个目录中有,$USER 是指一个用户名,用这个用户名和设置的密码登入SAMBA 服务器4 e$ q6 L8 P' T- f3 [
  c )连接7 r8 S2 U' L8 u7 L; x
  在Windows 中访问SAMBA 服务器,只要在网络邻居中添加一个连接就可以,输入地址时输入类似\\192.168.1.1\share 的地址。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-15 03:29 , Processed in 0.415384 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表