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

What is the solution of Samba to the interoperability between Linux and Windows?

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

Share

Shulou(Shulou.com)05/31 Report--

This article introduces what is the Samba solution to Linux and Windows interoperability, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Samba uses the Server message Block (SMB) protocol, which is used by Windows systems to communicate with each other. With Samba, you can have Linux systems map drives to Windows systems, and you can have Windows systems map drives to Linux systems, but the latter is much more likely.

Samba allows you to simulate file and print services on Linux systems. You may not know exactly what such a system can do for you, but in short, using Samba to create a Linux-based file and print server is expected to save you money and simplify management.

1. No domain is required

You do not need to implement a Windows Active Directory (AD) domain to use Samba file and print sharing. If you have a domain, you don't have to join the Windows system to the domain in order to provide file and print services to the Linux system. But there are two things that need to be done to make the two operating systems work seamlessly, as if they had an AD domain: synchronize passwords and match domain or workgroup names.

Note: I do not object to AD domain, but support AD domain. I am also an Windows administrator and understand the value of having an AD domain. If you do not have an AD domain, or do not want to join the Linux system to the domain, there are some workarounds.

Synchronize those passwords

One of the things you need to do when implementing Samba without an AD domain is to synchronize passwords. On Linux systems, set the password to be the same as the password used on the Windows system (or domain). Remember, you have to use the smbpasswd command to do this. The passwd command applies only to the Linux user account and does not affect the password of the Samba user.

Adding Samba users is actually a two-step process. The first step is to add a new user:

$sudo smbpasswd-a mjones

Second, you need to enable new users. This is the most often forgotten step:

$sudo smbpasswd-e mjones

Then use the smbpasswd command to change the password of the Samba user:

$sudo smbpasswd mjones

There is a way to synchronize users and passwords using the global configuration settings in the / etc/samba/smb.conf file, but this option is beyond the scope of this article.

Match domain or workgroup name

When setting up Samba, use the domain or workgroup name used by the Windows system. The default workgroup name (SAMBA) may not be useful in a Windows environment. Matching names will help you browse the Windows system, allowing the Windows system to browse the shared area of the Linux system without hindrance.

Linux systems with Samba enabled also appear in the browse list of domain computers. However, because the system is not an official domain member, Windows administrators cannot enforce policies or manage the system in any way. As a reminder, you should be given permission to configure the Linux system in this way.

A Linux system with Samba enabled looks like a Windows system

If you have a properly configured Samba-enabled Linux system on your network, it is difficult to distinguish it from the Windows system. You can even imitate the Windows version of your choice and let the Linux system report that it is a Windows system. Most users don't know the difference, nor do they care about one or more systems running Linux in a web browser.

Map the drive to the Samba share

If there is no AD domain, you need to create a CMD (such as LOGIN.CMD) file and place it in each user's Startup folder, which maps the drive to the Linux Samba file server. A good Windows administrator can implement mapped drives without having to touch each system. A simple Power Shell script can deploy CMD files to every Windows system on the network. If you have a domain, you can create a group policy to map the drive to the system and its shared area. In both cases, assume that your Linux file server is named FS1 and has two shared areas: Public and Projects. Map the drive from the Windows computer in the usual way:

NET USE P:\\ FS1\ PublicNET USE Q:\\ FS1\ Projects

If everything is set up correctly, the drive will be mapped without a password prompt, just as you would with a Windows file server. Standard shared areas can be locked for use by specific users or groups. Shared areas such as Public drives are usually open to everyone and can read and write.

Management shared area is not included

Windows administrators will notice that their favorite management sharing areas (C$, D$, etc.) do not exist and should not exist in Samba. Of course, you can create an administrative shared area, but unless you want to break the security of the Linux system for some reason, there is no reason to do so.

Printer sharing / service

Setting up printer sharing through Samba is a rather complex process. You have to create a shared area for Windows drivers and spooling print jobs, and you must share each printer separately. After the correct setting, the Samba printer sharing or service effect is very good. Be patient with this setting, as the installation settings of the Windows server can be frustrating compared to (almost automatic).

III. Optional Samba features and deployment

With Samba, your Linux system may become a browsing host, domain controller, or domain member without any commercial software. Of course, the feature list can never be completely compared to the actual Windows server, but for the sake of cost savings and easy overall setup, there is no mistake in choosing Samba to integrate with the Windows system.

To use Windows, simply create an Samba-enabled Linux. In other words, once you have set up, configured, and run Samba, there is no need to perform any special operations on the Windows system. From this perspective, Samba is easy to implement, and the only deployment is what you expect from the Windows server, because you don't need to install a third-party agent or special configuration to use the Samba server.

Note: due to the way you browse on the Windows network, the shared area and system may not be displayed for up to 45 minutes. Be patient, don't think anything goes wrong when the sharing area and system don't appear on the browsing list immediately.

On the Samba solution to Linux and Windows interoperability is what is shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

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