快速配置 Samba 将 Linux 目录映射为 Windows 驱动器,用于跨平
一、局域网内的 Linux 服务器上操作步骤:
1、安装samba(CentOS Linux):
2、创建www账号
3、创建samba配置文件
输入以下内容:
4、为samba用户www、root设立一个密码:
5、启动samba:
二、局域网内的 Windows 服务器上操作步骤:
1、Windows 上访问 samba,在“我的电脑”中输入:
2、Windows 断开 samba 共享连接,在【开始】→【运行】→【cmd】回车中输入:
1、安装samba(CentOS Linux):
yum install samba system-config-samba samba-client samba-common
2、创建www账号
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /data0/knose/
chmod 777 /data0/knose/
mkdir -p /data0/htdocs/
chown -R www:www /data0/htdocs/
chmod 777 /data0/htdocs/
cat /etc/passwd | mksmbpasswd.sh> /etc/samba/smbpasswd
/usr/sbin/useradd -g www www
mkdir -p /data0/knose/
chmod 777 /data0/knose/
mkdir -p /data0/htdocs/
chown -R www:www /data0/htdocs/
chmod 777 /data0/htdocs/
cat /etc/passwd | mksmbpasswd.sh> /etc/samba/smbpasswd
3、创建samba配置文件
mv -f /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
vi /etc/samba/smb.conf
输入以下内容:
引用
[global]
server string = Samba Server
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[knose]
workgroup = root
netbios name = root
path = /data0/knose
browseable = yes
writeable = yes
[web]
workgroup = www
netbios name = www
path = /data0/htdocs
browseable = yes
writeable = yes
server string = Samba Server
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
[knose]
workgroup = root
netbios name = root
path = /data0/knose
browseable = yes
writeable = yes
[web]
workgroup = www
netbios name = www
path = /data0/htdocs
browseable = yes
writeable = yes
4、为samba用户www、root设立一个密码:
smbpasswd -a www
smbpasswd -a root
smbpasswd -a root
5、启动samba:
/sbin/service smb start
二、局域网内的 Windows 服务器上操作步骤:
1、Windows 上访问 samba,在“我的电脑”中输入:
\\xxx.xxx.xxx.xxx\
2、Windows 断开 samba 共享连接,在【开始】→【运行】→【cmd】回车中输入:
net use * /del
3、将 samba 共享的 Linux 目录,映射成 Windows 的一个驱动器盘符:
相关推荐
sapliang 2020-07-29
yshlovelx 2020-07-19
饮马天涯 2020-05-20
vanturman 2020-05-08
baishuwei 2020-02-25
ROES 2020-02-14
zhongzhiwei 2020-02-01
xcznb 2020-01-17
tianyayi 2020-01-09
sapliang 2019-12-16
kevinli 2019-12-15
wq0 2019-12-08
thlm0 2019-12-02
悠悠风信子 2013-08-23
kernelstudy 2014-03-07
秋风瑟瑟 2019-11-12
85096220 2008-06-04
LychieFan 2008-04-30