快速业务通道

Linux4.0SAMBA SERVER relevant config

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-01

一.Service relevant config

1.[root@michael ~]# rpm -qa | grep samba

samba-client-3.0.10-1.4E.9

system-config-samba-1.2.21-1

samba-common-3.0.10-1.4E.9

samba-3.0.10-1.4E.9

2[root@michael ~]# vi /etc/samba/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

3.[root@michael ~]# grep -v "#" /etc/samba/smb.conf | grep -v ";"

[global]

workgroup = MYGROUP

server string = Samba Server

printcap name = /etc/printcap

load printers = yes

cups options = raw

log file = /var/log/samba/%m.log

max log size = 50

security = user

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

dns proxy = no

idmap uid = 16777216-33554431

idmap gid = 16777216-33554431

template shell = /bin/false

拥有帝国一切,皆有可能。欢迎访问phome.net

winbind use default domain = no

[homes] “共亨”

comment = Home Directories

browseable = no

writable = yes

[printers] “打印”

comment = All Printers

path = /var/spool/samba

browseable = no

guest ok = no

writable = no

printable = yes

4.Add samba server user.(system user no can login samba server )

[root@michael ~]# useradd abc2

[root@michael ~]# smbpasswd -a abc2

注意:” – h “ 显示smbpasswd的命令格式.

“-a “ 添加用户

“- d “ 禁用用户

“- e “ 启用用户

“- x” 删除用户

New SMB password:

Retype new SMB password:

startsmbfilepwent_internal: file /etc/samba/smbpasswd did not exist. File successfully created.

Added user abc2.

[root@michael ~]# cat /etc/samba/smbpasswd

abc2:504:E8450C7E07112982AAD3B435B51404EE:2D7F1A5A61D3A96FB5159B5EEF17ADC6:[U ]:LCT-4A776093:

5.[root@michael ~]# cd /home

[root@michael home]# cd abc2

[root@michael abc2]# ls

[root@michael abc2]# touch aaa

[root@michael abc2]# ls

aaa

[root@michael abc2]# vi aaa

who shi samba server

~

~

~

"aaa" 1L, 21C written

6.[root@michael ~]# vi /etc/samba/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

#

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号