启动samba服务--ubuntu 14.04

1. 修改配置文件

/etc/samba/smb.conf文件末尾添加

[homes]
   comment = Home Directories
   browseable = yes                                            
   read only = no                                   
   create mask = 0775                                         
   directory mask = 0775                                            
   valid users = %S

以上配置是给系统用户的home目录开启samba服务,有效用户是其所有者(valid users = %S)。

2. 添加samba用户

sudo smbpasswd -a username

如果没有什么安全性要求,此处添加的samba用户可以和系统用户相同,而不必再修改smbusers文件将samba用户和系统用户对应起来。

3. 重启samba服务

sudo service samba restart

[附]Arch Linux挂载samba目录

pacman -S smbclient                    # cifs-utils installed as well
smbclient -L hostname -U%        # list public shares on a server
mount -t cifs //SERVER/sharename mnt_point -o user=username,password=password

 

posted @ 2015-03-21 16:02  elmaple  阅读(3329)  评论(0编辑  收藏  举报