Chinaunix首页 | 论坛 | 博客
  • 博客访问: 161246
  • 博文数量: 171
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1990
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-05 10:49
文章分类

全部博文(171)

文章存档

2011年(9)

2010年(162)

我的朋友

分类: LINUX

2010-09-17 16:19:37

Samba includes a utility called SWAT, the Samba Web Administration Tool. This tool makes setting up Samba very easy. The main Samba configuration file is /etc/smb.conf. SWAT enables you to use a Web browser as the interface to /etc/smb.conf and makes the necessary modifications to this file. While you are using SWAT to make the configuration changes, you will learn more about the smb.conf file. A sample smb.conf file was created during the installation that can be used for reference. You should rename this file because you will create a new smb.conf using SWAT and it will overwrite the original file.
The smb.conf file is divided into several sections. Shown next is the smb.conf file from one of the computers on my home network.

# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2000/05/25 10:29:40
# Global parameters
[global]
workgroup = ONE
netbios name = TERRY
server string = Samba Server
security = SHARE
log file = /var/log/samba/log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
wins support = Yes
hosts allow = 192.168.1.
hosts deny = all
[homes]
comment = Home Directories
read only = No
[printers]
comment = All Printers
path = /var/spool/samba
guest ok = Yes
print ok = Yes
browseable = Yes
[sambashare]
path = /oldwin
valid users = naveen,ravi
read only = No
guest ok = no
browseable = yes

In the above file naveen and ravi are users who can have access to /oldwin from the windows client. Start the services now to make file sharing on windows. sambashare is the share name.

service smb restart

You can test whether the smb process is running with the pgrep command:

# pgrep smb

Now create samba user and password for naveen and ravi.

# useradd naveen
#smbpasswd -a naveen
Now it will prompt for password,give the password
same for Ravi user too

Now give the following command to mount the samba server:

# smbmount ///share -u

Now at windows client side :

start – run- \\ipaddress\share name

Then you will get the remote desktop of the shared folders in linux.

This way samba can acess from windows.


Edit by Frank


阅读(252) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~