LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2817|回复: 6

关于安装samba服务的一点心得!

[复制链接]
发表于 2002-9-10 23:47:11 | 显示全部楼层 |阅读模式
关于安装samba服务的一点心得
作者:etony

本文可以转载,但必须注明作者的大名,另外也要把来源于linuxsir.cn注明,只有通过来源,才能知道谁是真正的作者。尊重他人就是尊重自己!

致谢:多谢etony兄弟为弟兄们的奉献!

北南 加注



经过几天的忙活,
在参考了各位的大作后,
samba服务配置基本成功了!!!

在配置过程中,感觉有几点值得注意,希望对正在准备配samba的兄弟有所帮助!

1.在[global]下应该有netbios项
  它是在windos系统中网上邻居里的显示
  如 netbios name = linuxsamba

2.在[global]下建议将安全模式设为共享
  即 security = share
  由简到繁嘛

3.在[public]下设置共享文件夹的路径
  如path = /share
  应确保 /share 文件夹确实存在
  并删除[public]段前的";"

4.用testparm测试配置文件smb.conf
  用 /etc/rc.d/init.d/smb start 重起samba 服务

5.在linux下测试windows时,所用账号应为windows下存在的账号!

6.在linux下挂装windows共享目录是应该用smbmount命令,
  据说mount也可以,但我没有成功

7.如果想实现samba的web配置,需安装swat包!
  在这个地方我费了很多时间,没有成功!
  就是因为我没有安装swat包!

以上几点是我在配samba时,自认为应该注意的地方,
谬误之处请大家指正!

注:我用的是 RH7.3
发表于 2002-9-11 01:37:48 | 显示全部楼层
兄弟,辛苦了。
这几点都是极为重要的,对于弟兄们来说,可能就差这样的总结了。samba的基本问题,经过弟兄们的努力,也差不多结束了。如果还有弟兄想实现更多的功能,咱们再研究了。
我总是喜欢说一句话“慢慢来,把基础的先弄好,学习有个过程”。smb的问题也一样,我们只有把基本的实践了。我们才能向更高的目标迈进。

再次感谢etony兄弟为大家奉献。。。
发表于 2002-9-11 05:03:21 | 显示全部楼层

真诚感谢!

为了samba,折腾了几个晚上,参考了好多的资料也没有搞定,照着楼上朋友的方法,5分钟就搞定了,我真的非常谢谢楼顶的朋友和热心的版主
发表于 2002-9-11 18:11:14 | 显示全部楼层
顶楼的老兄。你的那个samab的smb.conf文件里的内容是这是和下面的一样呀。
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = MYGROUP

# server string is the equivalent of the NT Description field
server string = Samba Server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = /etc/printcap
load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
printing = lprng

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest

# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
max log size = 0

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user

# Use password server option only with security = server
# The argument list may include:
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
# password server = *
; password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

# The following is needed to keep smbclient from spouting spurious errors
# when Samba is built with support for SSL.
; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt

# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# You can use PAM's password change control flag for Samba. If
# enabled, then PAM will be used for password changes when requested
# by an SMB client instead of the program listed in passwd program.
# It should be possible to enable this without changing your passwd
# chat parameter for most setups.

pam password change = yes

# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
如果一样你都改什么地方了,请帮着指点一下。我先在这儿谢谢你了
发表于 2002-9-11 20:04:46 | 显示全部楼层
...
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = org.cn

# server string is the equivalent of the NT Description field
   server string = mysamba Server
.
.
.   security = user

# Use password server option only with security = server
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *
;   password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
;  password level = 8
;  username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
.
.
.
其他都用缺省配置;
1.在Linux上建立用户 test (#useradd test)
2.添加为samba用户,并给定口令
  #smbpasswd -a test
   New Password:
   Retype New Password:
3.在98上以test用户登陆(此时不需输入口令)
  打开网络邻居,应该看到org.cn组(即以上的workgroup = org.cn),点开应该看到 mysamba Server主机,双击后弹出窗口 输入口令即可!!!

   祝好运
---------------------------------------------------------------------
踢死 门s  扔掉窗子 !!!
 楼主| 发表于 2002-9-12 13:13:59 | 显示全部楼层
我的smb.conf的一部分,


[global]
netbios name = jsb002
workgroup = jsb
server string = Samba Server
log file = /var/log/samba/%m.log
max log size = 50
security = share

[public]
   comment = Public Stuff
   path = /tool
   public = yes
   writable = yes
发表于 2007-12-6 07:04:43 | 显示全部楼层
不错啊,太好了
回复 支持 反对

使用道具 举报

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

本版积分规则

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