安装samba
sudo su
apt-get install samba system-config-samba samba-client samba-common
创建用户和共享目录(用windows共享访问)
groupadd www
useradd -g www www
mkdir /var/www/webdev
chown -R www:www /var/www/webdev
chmod -R 777 /var/www/webdev
创建samba配置文件
cat /etc/passwd | mksmbpasswd > /etc/samba/smbpasswd
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
nano /etc/samba/smb.conf
输入以下内容
###################
[global]
server string = Samba Server
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[web]
workgroup = www
netbios name = www
path = /var/www/webdev
browseable = yes
writeable = yes
###################
为samba用户www设置密码
smbpasswd -a www
到此服务器设置完成。
在windows上映射驱动器
sudo su
apt-get install samba system-config-samba samba-client samba-common
创建用户和共享目录(用windows共享访问)
groupadd www
useradd -g www www
mkdir /var/www/webdev
chown -R www:www /var/www/webdev
chmod -R 777 /var/www/webdev
创建samba配置文件
cat /etc/passwd | mksmbpasswd > /etc/samba/smbpasswd
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
nano /etc/samba/smb.conf
输入以下内容
###################
[global]
server string = Samba Server
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[web]
workgroup = www
netbios name = www
path = /var/www/webdev
browseable = yes
writeable = yes
###################
为samba用户www设置密码
smbpasswd -a www
到此服务器设置完成。
在windows上映射驱动器