Ubuntu Mount CIFS

Source: Internet
Author: User

problem Scenario : There is a server A, its IP address is 192.168.1.1 shared a directory sharefolder, Server A and my Windows 7 machine B in the same domain: MyDomain, I can perform on Windows 7 \\192.168.1.1\sharefolder, direct access to the contents of server A's shared directory. There is also an Ubuntu 12.10 machine C, you want to access server A, how to do it.

steps to resolve :

Execute Mount CIFS command on Ubuntu machine

$ mkdir/mnt/shared

$ sudo mount-t cifs//192.168.1.1/sharefolder/mnt/shared

Prompt for error messages

Mount:wrong fs type, bad option, bad superblock on//192.168.1.1/sharefolder,

Missing codepage or helper program, or other error

(for several filesystems (e.g. NFS, CIFS) might

Need a/sbin/mount.<type> Helper Program)

In some cases useful info are found in Syslog-try DMESG | Tail or so

From the above error message, we find that the reason for the failure is the lack of the mount.cifs application. Google search found that mount.cifs is a cifs-utils package. We need to install Cifs-utils first.

$ sudo apt-get install Cifs-utils

Once the installation is successful, we execute the command again

$ sudo mount-t cifs//192.168.1.1/sharefolder/mnt/shared

At this point the error is still prompt:

Mount Error: Permission denied

Since the sudo command has been executed, it should not be the root user, but not the access server A, recall my window7 machine B and Server A in the same domain, I log on machine B is also used by the domain account and domain password. So accessing server A from window machine B does not require a password, but Ubuntu machine C is needed. So I try to add a domain account and password to log in again

$ sudo mount-t cifs//192.168.1.1/sharefolder/mnt/shared-o username=mydomain/myname, password=mypasswd

Command execution succeeded.

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.