Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux hangs on the Windows operating system shared folder

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

First, prepare the shared directory of Windows

Create a folder to enable anonymous access, and you can enter your password when you mount Linux.

Mount the directory to the Linux system

Mount-t cifc "path to windows shared folder"linux / mnt path"

For example

Mkdir / windows

Mount-t cifs / / 192.168.1.10/linuxshare / windows

Linux asks for a password to access the Windows shared folder.

The following is a shared folder set according to user permissions

Mount-t cifc "windows shared folder"Linux / mnt path"

I.e. Mount-t cifs / / 16.187.190.60/test / mnt/

Linux asks for a password to access the Windows shared folder.

Note:

Prompt in Linux:

Unable to find suitable address.

Indicates that the remote shared folder path does not exist. Please check carefully and correct the directory path.

two

Mount-t cifc "windows shared folder"Linux / mnt path"

I.e. Mount-t cifs / / 16.187.190.50/test / mnt/

Note:

Prompt in Linux:

Mount error (13): Permission denied

Refer to the mount.cifs (8) manual page (e.g. Man mount.cifs)

Solution: add the username and password that accesses the Windows shared directory directly to the command.

three

Mount-t cifs-o username=WindowsLogin,password= "passwordinWindows"

/ / 16.187.190.50/test / mnt/

Note: in this command, username is the user on windows; password is the password for window user.

four

The command for step 3 can also be implemented in the following ways:

Mount.cifs-o username= "Administrator", password= "PasswordForWindows" / / 16.187.190.50/test / mnt/

five

You can successfully mount the windows shared folder under the / mnt directory through steps 3 and 4. However, because the mount command can only be used by root authorized users. The default owner and group for its mounted folder is root, and permissions cannot be changed through the chmod command.

six

Use the mount command to specify owner and group. Net for mounting the shared folder.

Mount.cifs-o username= "Administrator", password= "PasswordForWindows", uid=Mysa,gid=Mysa / / 16.187.190.50/test / mnt/

seven

Check the owner and group of the folder in / mnt/.

eight

Change folder permissions. Give write permission to the group in which the mount shared folder belongs.

Mount.cifs-o username= "Administrator", password= "PasswordForWindows", Mysa,gid=Mysa,dir_mode=0777 / / 16.187.190.50/test / mnt/

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report