samba共享配置

来源:互联网 发布:唐湘龙 知乎 编辑:程序博客网 时间:2024/06/06 00:22
 

步骤1 以root用户登录,启动samba服务

 

#smbd –D

#nmbd –D

 

请先确认smbd,nmbd是否已经启动,如果启动了,就不需要启动了。

 

步骤2 将用户增加为samba用户

 

# smbpasswd -a  xxx

New SMB password:

Retype new SMB password:

密码可以不与登录密码相同。

步骤3 修改/etc/samba/smb.conf文件

 

smb.conf增加如下的配置。

[xxx]

comment = xxx

path = /app//xxx

read only = No

inherit acls = Yes

OR

[xxx]
        comment = xxx
        valid users = xxx, root
        path = /home/xxx
        writable = yes

 

步骤4 重新启动smbd

 

# /etc/rc.d/smb restart

Shutting down Samba SMB daemon Warning: daemon not running. done

Starting Samba SMB daemon done

#

 

步骤5 配置Windows访问Linux的网络映射

使用\\IP,就可以访问Linux目录:

 

 

原创粉丝点击