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

How to quickly configure Samba to map Linux directories to Windows drives

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article shows you how to quickly configure Samba to map Linux directories to Windows drives, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Operation steps on the Linux server in the local area network:

1. Install samba (CentOS Linux):

Yum install samba system-config-samba samba-client samba-common

2. Create a www account

/ usr/sbin/groupadd www

/ usr/sbin/useradd-g www www

Mkdir-p / data0/knose/

Chmod 777 / data0/knose/

Mkdir-p / data0/htdocs/

Chown-R www:www / data0/htdocs/

Chmod 777 / data0/htdocs/

Cat / etc/passwd | mksmbpasswd.sh > / etc/samba/smbpasswd

3. Create a samba configuration file

Mv-f / etc/samba/smb.conf / etc/samba/smb.conf.bak

Vi / etc/samba/smb.conf

Enter the following:

Quote

[global]

Server string = Samba Server

Security = user

Encrypt passwords = yes

Smbpasswd file = / etc/samba/smbpasswd

[knose]

Workgroup = root

Netbios name = root

Path = / data0/knose

Browseable = yes

Writeable = yes

[web]

Workgroup = www

Netbios name = www

Path = / data0/htdocs

Browseable = yes

Writeable = yes

4. Set a password for samba users www and root:

Smbpasswd-a www

Smbpasswd-a root

5. Start samba:

/ sbin/service smb start

2. Operation steps on the Windows server in the local area network:

1. Visit samba on Windows and type in "my computer":

\\ xxx.xxx.xxx.xxx\

2. Windows disconnects the samba sharing connection, and enter in [start] → [run] → [cmd] enter:

Net use * / del

3. Map the Linux directory of samba share to a drive letter of Windows.

3. Cross-platform Cramp code compilation and debugging:

Use the editor under Windows to write and modify the cross-platform CumberCraft + code. After saving, you don't need to copy it to other places, and you can compile and debug the program at the same time using the gaming +, gcc and gdb under the Visual Studio,Linux under Windows.

Note: it is important to note that executing the ".bat" batch script on a samba shared drive will result in a Windows blue screen.

The above is how to quickly configure Samba to map Linux directories to Windows drives. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

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