Mount Windows sharing with the Smbmount command in Linux

Source: Internet
Author: User

In Windows, you can map a shared directory to a disk file system by ing network drives. in Linux, you can use the smbmount command to implement similar functions, mount a shared directory in Windows to a directory in Linux.

Test Platform:

Red Hat Enterprise Linux AS release 3 (Taroon)

Windows 2000 Advanced Server SP4

Current Test conditions:

1. Windows and Linux are in the same LAN, and can be pinged to each other without a firewall

2. Windows IP Address: 192.168.60.188

3. Linux IP Address: 192.168.60.189

4. The following shares are currently available on Windows: c $, tempeveryone has read permission)

5. Windows users have cmw Administrator group user accounts), grp Administrator group user accounts), guest is not enabled currently), no root account

6. Install the relevant RPM package on Linux: samba-client, which is a Samba client tool. After installation, run the smbmount command.

The basic test process is as follows:

Syntax: smbmount // ip address/shared name mount point-o option 1, option 2 ......

1. Mount c $ share:

[Root @ rh root] # smbmount // 192.168.60.188/c $./c $-o username = cmw

Password:

[Root @ rh root] # cd c $

Or:

[Root @ rh root] # smbmount // 192.168.60.188/c $./c $-o username = cmw, password = cmww

Lovegrp

[Root @ rh root] # cd c $

2. Mount temp sharing to enable the guest account)

[Root @ rh root] # smbmount // 192.168.60.188/temp./temp

Password:

[Root @ rh root] # cd temp/

[Root @ rh temp] # ls

Samba webmin-1.260.tar.gz.

If no account or password is specified, use the environment variable "USER" as the account and the environment variable PASSWD as the password. Because Windows has enabled the guest account, and temp sharing allows anyone to read the password, so this command runs successfully.

[Root @ rh root] # umount./temp

Detach a Network File System

3. Mount the temp share. The guest account is not enabled)

[Root @ rh root] # smbmount // 192.168.60.188/temp./temp

Password:

Anonymous login successful

2068: tree connect failed: ERRDOS-ERRnoaccess (Access denied .)

SMB connection failed

The connection failed because the guest account is disabled.

Related Articles]

  • Tricks learning file sharing access self-built Network Expert
  • Use samba to share WIN2000 and Linux Files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.