user:由提供服务的samba服务器负责检查账户及密码(默认)
server:检查账户及密码的工作由另一台windows或samba服务器负责
domain:指定windows域控制服务器来验证用户的账户及密码)
comment=This is my samba server (这是注释行,可以不写东西)
path=/samba (指定要共享文件的位置)
writable = yes
browseable =yes
read only = yes
create mode=0664 (这是文件权限)
directory mode=0777 (这是目录权限)
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@linux samba]# testparm (检查配置文件的正确性)
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[samba]"
Loaded services file OK.
Press enter to see a dump of your service definitions
[root@linux samba]# passwd samba (给samba用户添加密码)
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.
(-a必须加,为了生成密码文件smbpasswd,该密码是windows登陆Linux的samba用户密码)
New SMB password:
Retype new SMB password:
unable to open passdb database.
Added user samba.
samba:500:A
Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@linux usr]# chmod 777 /usr/samba (samba服务器受本地文件系统权限和共享权限两种权限,而且是取最严格的权限,为了方便就把本地权限都给足好了)
[root@linux usr]# cd samba
[root@linux samba]# vi aaa.txt

















