一. Ubuntu samba配置的安装:
sudo apt-get insall samba
sudo apt-get install smbfs
二. 创建共享目录:
mkdir /home/suixiang/share
sodu chmod 777 /home/suixiang/share
三. 创建Ubuntu Samba配置文件:
1. 保存现有的配置文件
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
2. 修改现配置文件
sudo gedit /etc/samba/smb.conf
在smb.conf最后添加
[share]
path = /home/suixiang/share
available = yes
browsealbe = yes
public = yes
writable = yes
四. 创建Ubuntu samba帐户
sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a suixiang
然后会要求你输入samba帐户的密码
如果没有第四步,当你登录时会提示 session setup failed: NT_STATUS_LOGON_FAILURE]
五. 重启Ubuntu samba服务器
sudo /etc/init.d/smbd restart
一个配置实例
[smbshare]
workgroup = WORKGROUP
comment = aaron ubuntu Samba share
valid users = root
path = /work/samba
available = yes
browseable = yes
public = yes
writable = yes
create mask = 0766
directory mask = 0766
force user = root
force group = root
用samba时出现"Failed to find entry for user..."
[root@localhost samba]# smbpasswd samba
New SMB password:
Retype new SMB password:
Failed to find entry for user samba.
解决方法,加参数'-a':
# smbpasswd -a oracle
[root@localhost samba]# smbpasswd -a samba
New SMB password:
Retype new SMB password:
Added user samba.