标签:
安装samba:
sudo apt-get install samba samba-common
由于是挂载另一个磁盘,并作为共享文件存放地:
列出磁盘名和ID
air@air-device:~$ sudo blkid [sudo] password for air: /dev/sda1: UUID="a5f1012b-2bc8-4bab-9bd0-970d71d25d53" TYPE="ext4" /dev/sda3: UUID="a986493f-d482-4c2a-b595-8464b0b56e9d" TYPE="swap" /dev/sda4: UUID="9536921e-ae42-4378-984f-96363d45be35" TYPE="ext4" /dev/sda5: UUID="ac42779b-ec32-4f1d-a421-2181ca88366d" TYPE="ext4"
使用gedit修改/etc/fstab文件,在文件末尾加上如下内容并保存:
UUID=a5f1012b-2bc8-4bab-9bd0-970d71d25d53 /data ext4 defaults 0 1
使用如下命令创建和共享文件夹:
sudo mkdir /data/share sudo chmod 777 /data/share
配置samba:
sudo gedit /etc/samba/smb.conf
[FamilyCloud]
comment = My Share Folder
path = /data/familycloud
guest ok = no
browseable = yes
writeable=yes
create mask = 0600
directory mask = 0700
# Cap the size of the individual log files (in KiB). max log size = 1000 security = user
创建用户名和密码:
sudo useradd smbuser sudo smbpasswd -a smbuser
标签:
原文地址:http://www.cnblogs.com/gisair/p/5499808.html