2021-05-12 14:32:11
在Linux下掛載Windows系統共用目錄
預設情況下,Linux伺服器會裝有samba-client,但是沒有裝samba-server。但是存取Windows系統共用,安裝有samba-client就可以了。
[root@test ~]# rpm -qa | grep samba
samba-3.6.23-14.el6_6.x86_64
samba-client-3.6.23-14.el6_6.x86_64
samba-common-3.6.23-14.el6_6.x86_64
samba-winbind-clients-3.6.23-14.el6_6.x86_64
samba-swat-3.6.23-14.el6_6.x86_64
samba-winbind-devel-3.6.23-14.el6_6.x86_64
samba-winbind-3.6.23-14.el6_6.x86_64
samba-winbind-krb5-locator-3.6.23-14.el6_6.x86_64
嘗試掛載
[root@test ~]# mount -t cifs -o "username=domainuser" //192.168.1.101/share /mnt/share
常見錯誤:
mount: wrong fs type, bad option, bad superblock on //dbxi2.sl.dxdbbackup/Backup_Mgo13,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
需要安裝cifs-utils
[root@test ~]# yum install cifs-utils
重新掛載
[root@test ~]# mount -t cifs -o "username=domainuser" //192.168.1.101/share /mnt/share
檢視掛載的指定主機的Windows系統共用
[root@test ~]# smbclient -L 192.168.1.101 -U domainuser
Enter domainuser's password:
Domain=[domain] OS=[Windows Server 2008 R2 Standard 7601 Service Pack 1] Server=[Windows Server 2008 R2 Standard 6.1]
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
C$ Disk Default share
cdn Disk
D$ Disk Default share
dbbackup Disk
E$ Disk Default share
FTP Disk
iisbackup Disk
IPC$ IPC Remote IPC
MSSQL_REPL Disk
share Disk
tmp Disk
session request to 192.168.1.101 failed (Called name not present)
Domain=[domain] OS=[Windows Server 2008 R2 Standard 7601 Service Pack 1] Server=[Windows Server 2008 R2 Standard 6.1]
Server Comment
--------- -------
Workgroup Master
--------- -------
------------------------------------分割線------------------------------------
如何在Ubuntu 14.04中使用Samba共用檔案 http://www.linuxidc.com/Linux/2014-07/104894.htm
VMWare 虛擬機器 Ubuntu 雙網絡卡 存取 samba 速度 翻倍 http://www.linuxidc.com/Linux/2013-06/85445.htm
Samba檔案共用伺服器加入Windows Server 2003域 http://www.linuxidc.com/Linux/2013-06/86391.htm
Samba安裝設定 http://www.linuxidc.com/Linux/2013-06/86101.htm
CentOS 6.2 下Samba 服務的設定 http://www.linuxidc.com/Linux/2013-01/78390.htm
Samba伺服器安裝和設定 http://www.linuxidc.com/Linux/2014-12/110459.htm
Win7+VMware+Fedora18 Samba伺服器的搭建圖解 http://www.linuxidc.com/Linux/2013-01/78234.htm
------------------------------------分割線------------------------------------
相關文章