標籤:samba-client samba cifs mount
在Linux下掛載Windows系統共用目錄
預設情況下,Linux伺服器會裝有samba-client,但是沒有裝samba-server。但是訪問Windows系統共用,安裝有samba-client就可以了。
[[email protected] ~]# rpm -qa | grep sambasamba-3.6.23-14.el6_6.x86_64samba-client-3.6.23-14.el6_6.x86_64samba-common-3.6.23-14.el6_6.x86_64samba-winbind-clients-3.6.23-14.el6_6.x86_64samba-swat-3.6.23-14.el6_6.x86_64samba-winbind-devel-3.6.23-14.el6_6.x86_64samba-winbind-3.6.23-14.el6_6.x86_64samba-winbind-krb5-locator-3.6.23-14.el6_6.x86_64
嘗試掛載
[[email protected] ~]# mount -t cifs -o "username=domain\user" //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 mightneed a /sbin/mount.<type> helper program)In some cases useful info is found in syslog - trydmesg | tail or so
需要安裝cifs-utils
[[email protected] ~]# yum install cifs-utils
重新掛載
[[email protected] ~]# mount -t cifs -o "username=domain\user" //192.168.1.101/share /mnt/share
查看掛載的指定主機的Windows系統共用
[[email protected] ~]# smbclient -L 192.168.1.101 -U domain\\user
Enter domain\user‘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 AdminC$ Disk Default sharecdn DiskD$ Disk Default sharedbbackup DiskE$ Disk Default shareFTP Diskiisbackup DiskIPC$ IPC Remote IPCMSSQL_REPL Diskshare Disktmp Disksession 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--------- -------
本文出自 “SQL Server Deep Dives” 部落格,請務必保留此出處http://ultrasql.blog.51cto.com/9591438/1680237
在Linux下掛載Windows系統共用目錄