Fedora Linux系统配置Samba服务器

  发布时间:2008-09-08 17:17:45   作者:佚名   我要评论
◆前期实验环境介绍: 系统环境:Windows xp sp3 IP:192.168.1.10 虚拟机下安装了Fedora-8-i386 IP:192.168.1.12 ◆1、首先检查系统是否安装好了samba。 [root@cisco samba]# rpm -qa | grep smb 如果出现下面三行内容,则表示已经安装好了Samba
(福利推荐:【腾讯云】服务器最新限时优惠活动,云服务器1核2G仅99元/年、2核4G仅768元/3年,立即抢购>>>:9i0i.cn/qcloud

(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

◆5、添加可以访问我们刚才设置共享目录的用户:testuser

1)建一个系统用户

[root@linux samba]# useradd testuser (建一个名叫testuser的用户)

[root@linux samba]# passwd t (给testuser用户添加密码)

Changing password for user samba.

New password: (密码要六位以上,不显示在屏幕上)

BAD PASSWORD: it does not contain enough DIFFERENT characters

Retype new password: (确认密码)

passwd: all authentication tokens updated successfully

2) 更新 /etv/samba/smbpasswd 文件

[root@linux samba]# cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

3) 然后创建samba帐户

[root@cisco samba]# smbpasswd -a testuser

New SMB password:

Retype new SMB password:

Added user testuser.

6、重新启动smb服务

[root@cisco samba]# service smb restart

Shutting down SMB services: [ OK ]

Starting SMB services: [ OK ]

[root@cisco samba]# service nmb restart

Shutting down NMB services: [ OK ]

Starting NMB services: [ OK ]

◆测试:两个系统进行相互访问

下面我们在Windows下测试一下,我的系统为Windows xp sp3

在Linux 下访问Windows的共享资源,显示信息为:

[root@cisco samba]# smbclient -L //192.168.1.10

Password:

Domain=[XPSP3] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment

--------- ---- -------

Printer Adobe PDF Office Document Image Writer

session request to 192.168.1.10 failed (Called name not present)

session request to 192 failed (Called name not present)

Domain=[XPSP3] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment

--------- -------

Workgroup Master

--------- -------

在Linux 下访问自己的samba服务器,显示信息为:

[root@cisco samba]# smbclient -L //192.168.1.12

Password:

Anonymous login successful

Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.26a-6.fc8]

Sharename Type Comment

--------- ---- -------

homes Disk Home Directories

rose Disk This is my samba server!

test-1 Disk This is my samba server!

IPC$ IPC IPC Service (Samba)

Anonymous login successful

Domain=[MSHOME] OS=[Unix] Server=[Samba 3.0.26a-6.fc8]

Server Comment

--------- -------

MM'S SAMBA Samba

Workgroup Master

--------- -------

MSHOME

相关文章

最新评论

?


http://www.vxiaotou.com