Linux访问WINDOWS共享:
[reject@localhost /]$ smbclient //172.16.198.133/baidu -U root # -U参数指定用户名 -P 指定密码
Enter root's password:
Domain=[RJL] OS=[Windows 6.1] Server=[Samba 4.2.10]
smb: \>
Linux挂载samba文件系统:
[reject@localhost /]$ sudo mount.cifs //172.16.198.129/baidu -o username=root,uid=$USER,gid=$USER /mnt
Password for root@//172.16.198.129/baidu: ***
#mount.cifs命令解释: -o 参数制定用户名,用户ID,$USER即以当前用户ID挂载
查看挂载:
[reject@localhost /]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 1969000 0 1969000 0% /dev
tmpfs 1982088 520 1981568 1% /dev/shm
tmpfs 1982088 1520 1980568 1% /run
tmpfs 1982088 0 1982088 0% /sys/fs/cgroup
/dev/mapper/Fedora-root 51474912 8520284 40316804 18% /
tmpfs 1982088 77740 1904348 4% /tmp
/dev/mapper/fedora-home 252830520 28018920 211945452 12% /home
/dev/sda2 999320 155492 775016 17% /boot
tmpfs 396416 20 396396 1% /run/user/1000
/dev/sda1 157292380 132559492 24732888 85% /run/media/reject/0000CB820003A6CC
/dev/sdb1 59633876 46642352 12991524 79% /run/media/reject/DATA//172.16.198.133/baidu 18307072 5095444 13211628 28% /mnt
------------------------------------分割线------------------------------------
如何在Ubuntu 14.04中使用Samba共享文件
VMWare 虚拟机 Ubuntu 双网卡 访问 samba 速度 翻倍
Samba文件共享服务器加入Windows Server 2003域
CentOS 6.2 下Samba 服务的配置
------------------------------------分割线------------------------------------