3种方式实现自动挂载samba共享目录
服务器端安装samba服务
配置 /etc/samba/smb.conf
security = user
[u1]
comment = u1
path = /var/ftp/u1
valid = jack @upup
write list = jack
[u2]
comment = u2
path = /var/ftp/u2
writable = yes
valid = jack @upup
read list = jack
客户端配置
1.vim /etc/rc.d/rc.local
mount -o username=jack,password=111 //10.8.8.1/u1 /u1
2.vim /etc/fstab
//10.8.8.1/u2 /u2 cifs rw,username=abc1,password=111 0 0
3.vim /etc/auto.master
/bb /etc/auto.bb
touch /etc/auto.bb
bb -fstype=cifs,username=abc2%111 ://10.8.8.1/u2
service atuofs restart
mkdir /bb
cd /bb/bb
时间: 2024-10-11 16:13:52