SMB user management method and device, electronic equipment and readable storage medium

By creating a unified database in the shared service cluster to record user tags and serial numbers of SMB users, the isolation problem of user management under the Samba service architecture is solved, and unified management is achieved in both single-node and cluster modes, improving the efficiency of user data sharing and access.

CN118885994APending Publication Date: 2024-11-01ZHENGZHOU INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411095783.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The existing Samba service architecture cannot achieve unified management of SMB users in single-node mode and cluster mode, causing users to automatically become invalid when switching modes, making it impossible to share and access in different modes.

Method used

A unified database is created in the shared service cluster, and all service nodes connect to this database to store user information tables for SMB users. User tags and serial numbers are set according to the working mode to realize the recording of user type and the most recently updated serial number, so as to support unified management in single-node mode and cluster mode.

Benefits of technology

It enables unified management of SMB users under different working modes, ensures seamless data conversion when switching modes, improves the stability and security of the shared service cluster, and enhances the enterprise's centralized management capabilities for SMB users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885994A_ABST
    Figure CN118885994A_ABST
Patent Text Reader

Abstract

The invention discloses an SMB user management method and device, electronic equipment and a readable storage medium, which are applied to any service node in a shared service cluster, and comprise the following steps: creating a target SMB user, and determining a working mode; if the mode is a single-node mode, determining a new serial number according to the serial number of each SMB user with the same name in other service nodes of the target SMB user, setting the user serial number as the new serial number in a user information table corresponding to the target SMB user, and setting a user tag as an independent user; if the target SMB user is in the cluster mode, setting a user serial number as a default serial number in a user information table corresponding to the target SMB user, setting a user tag as a cluster user, and updating the user serial number in the cluster mode along with the updating of the corresponding user information table; and managing each SMB user according to each user information table. According to the scheme, simultaneous support of the shared service cluster for a single-node mode and a cluster mode is realized, and unified management of SMB users is further realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cluster systems, and in particular to an SMB user management method, and also to an SMB user management device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Samba is a service suite that implements the SMB protocol (Server Message Block, a shared transmission protocol between different network nodes) on Linux and UNIX systems. Its main purpose is to provide SMB sharing services to Windows clients on Linux or UNIX servers, thereby facilitating centralized management of employee user data within the enterprise.

[0003] The premise of using Samba service is to provide authentication users first. There are two types of authentication users directly created based on Samba service: single-node users and cluster users. These two types of users cannot communicate with each other under normal circumstances, that is, authentication users created when Samba service works in single-node mode can only be used in single-node mode, and authentication users created in cluster mode can only be used in cluster mode. The significant problem is that when the customer sets Samba service to switch between single-node mode and cluster mode, users created in one mode will automatically become invalid when in the other mode. It can be seen that the existing technical architecture of Samba service is independent of each other for user management in cluster mode and single-node mode, that is, SMB users created in single-node mode cannot be seen in cluster mode, and conversely, SMB users created in cluster mode cannot be seen when switched to single-node mode, which means that the uniformity of user management in single-node mode and cluster mode is isolated.

[0004] Therefore, how to realize the shared service cluster to support both the single node mode and the cluster mode, and then realize the shared service cluster to manage SMB users in a unified manner under the two different working modes is a problem to be solved urgently by those skilled in the art. Summary of the invention

[0005] The purpose of the present application is to provide an SMB user management method, which can realize the simultaneous support of a shared service cluster for a single-node mode and a cluster mode, thereby realizing the unified management of SMB users by the shared service cluster under two different working modes; another purpose of the present application is to provide an SMB user management device, an electronic device, a computer-readable storage medium, and a computer program product, all of which have the above-mentioned beneficial effects.

[0006] In a first aspect, the present application provides an SMB user management method, which is applied to any service node in a shared service cluster, where all service nodes in the shared service cluster are connected to a unified database, and the unified database is used to store user information tables of all SMB users in the shared service cluster, and the method includes:

[0007] When receiving an SMB user creation command, creating a target SMB user according to the SMB user creation command, and determining a working mode of the shared service cluster; the working mode includes a single node mode and a cluster mode;

[0008] If the working mode is the single-node mode, determine the SMB users with the same name as the target SMB user in each of the other service nodes, determine a new serial number according to the serial numbers of each of the SMB users with the same name, set the user serial number as the new serial number in the user information table corresponding to the target SMB user, and set the user label as an independent user;

[0009] If the working mode is the cluster mode, the user serial number is set as the default serial number in the user information table corresponding to the target SMB user, and the user tag is set as a cluster user; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated;

[0010] Each of the SMB users is managed according to each user information table in the unified database.

[0011] Optionally, when the SMB user management operation is specifically a modification operation, managing each SMB user according to each user information table in the unified database includes:

[0012] Determine the user data of the SMB user to be modified;

[0013] If the working mode is the single-node mode, determine whether there is an SMB user with the same name as the SMB user to be modified locally in the service node; if so, overwrite the original user data of the SMB user with the same name with the user data, and set the user label as an independent user in the user information table corresponding to the SMB user with the same name; if not, execute the step of creating a target SMB user according to the SMB user creation command;

[0014] If the working mode is the cluster mode, determine whether there is an SMB user with the same name as the SMB user to be modified in the shared service cluster; if so, use the user data to overwrite the original user data of the SMB user with the same name, and set the user label as a cluster user in the user information table corresponding to the SMB user with the same name, and synchronize other service nodes to perform the modification operation; if not, execute the step of creating the target SMB user according to the SMB user creation command.

[0015] Optionally, when the SMB user management operation is specifically a retrieval operation, managing each SMB user according to each user information table in the unified database includes:

[0016] Determine the user information of the target SMB user to be queried;

[0017] If the working mode is the single node mode, the user information is used to determine whether the target query SMB user exists locally in the service node; if so, the user data of the target query SMB user is output; if not, an error prompt is output;

[0018] If the working mode is the cluster mode, the user information is used to determine whether there is a target query SMB user with a user label of a cluster user locally in the service node; if so, the user data of the target query SMB user with a user label of a cluster user is output; if not, all target query SMB users with a user label of an independent user are determined in the shared service cluster, and the target query SMB user with a user serial number of the latest serial number is determined among all target query SMB users with a user label of an independent user, and the user data of the target query SMB user with a user serial number of the latest serial number is output.

[0019] Optionally, when the SMB user management operation is specifically a deletion operation, managing each SMB user according to each user information table in the unified database includes:

[0020] Confirm the SMB user to be deleted;

[0021] If the working mode is the single node mode, deleting the SMB user with the same name as the SMB user to be deleted in the local service node;

[0022] If the working mode is the cluster mode, the SMB users with the same name as the SMB user to be deleted in the shared service cluster are deleted.

[0023] Optionally, when receiving an SMB user creation command, after creating a target SMB user according to the SMB user creation command, the method further includes:

[0024] Determine whether there is a default user group in the shared service cluster;

[0025] If so, executing the step of determining the working mode of the shared service cluster;

[0026] If not, the target SMB user is set to belong to the default user group, and the user information of the target SMB user is added to the member list of the default user group, and the process returns to the step of creating the target SMB user according to the SMB user creation command when an SMB user creation command is received.

[0027] Optionally, when the service node is a newly added service node, the method further includes:

[0028] Determining a working mode of the shared service cluster;

[0029] If the working mode is the single node mode, executing the preset operation;

[0030] If the working mode is the cluster mode, the user information of each of the SMB users whose user tag is a cluster user is obtained from the main service node of the shared service cluster and saved locally.

[0031] Optionally, the SMB user management method further includes:

[0032] Receive an SMB connection request from a client for the target SMB user;

[0033] Determine whether the target SMB user exists according to the SMB connection request;

[0034] If it does not exist, an error message is fed back to the client;

[0035] If so, a response message is fed back to the client to receive the password data of the target SMB user sent by the client, verify the password data using the registered password data of the target SMB user, and establish an SMB connection with the client when the verification passes.

[0036] In a second aspect, the present application further provides an SMB user management device, which is applied to any service node in a shared service cluster, wherein all service nodes in the shared service cluster are connected to a unified database, and the unified database is used to store user information tables of all SMB users in the shared service cluster, and the device includes:

[0037] A determination module, configured to, when receiving an SMB user creation command, create a target SMB user according to the SMB user creation command, and determine a working mode of the shared service cluster; the working mode includes a single node mode and a cluster mode;

[0038] A first setting module is used for, if the working mode is the single-node mode, determining SMB users with the same name as the target SMB user in each of the other service nodes, determining a new serial number according to the serial numbers of each of the SMB users with the same name, setting the user serial number as the new serial number in the user information table corresponding to the target SMB user, and setting the user label as an independent user;

[0039] A second setting module is used for setting the user serial number as a default serial number and the user tag as a cluster user in the user information table corresponding to the target SMB user if the working mode is the cluster mode; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated;

[0040] The management module is used to manage each of the SMB users according to each user information table in the unified database.

[0041] In a third aspect, the present application further discloses an electronic device, comprising:

[0042] Memory for storing computer programs;

[0043] A processor is used to implement the steps of any one of the SMB user management methods described above when executing the computer program.

[0044] In a fourth aspect, the present application further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the SMB user management methods described above are implemented.

[0045] In a fifth aspect, the present invention further discloses a computer program product, including a computer program / instruction, which implements the steps of any one of the SMB user management methods described above when executed by a processor.

[0046] The present application provides an SMB user management method, which is applied to any service node in a shared service cluster, wherein all service nodes in the shared service cluster are connected to a unified database, and the unified database is used to store user information tables of all SMB users in the shared service cluster. The method comprises: when an SMB user creation command is received, a target SMB user is created according to the SMB user creation command, and a working mode of the shared service cluster is determined; the working mode comprises a single node mode and a cluster mode; if the working mode is the single node mode, the SMB users with the same name as the target SMB user in other service nodes are determined, a new serial number is determined according to the serial numbers of the SMB users with the same name, the user serial number is set to the new serial number in the user information table corresponding to the target SMB user, and the user label is set to an independent user; if the working mode is the cluster mode, the user serial number is set to the default serial number in the user information table corresponding to the target SMB user, and the user label is set to a cluster user; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated; and each SMB user is managed according to each user information table in the unified database.

[0047] Applying the technical solution provided by the present application, a unified database is created in a shared service cluster, so that all service nodes in the shared service cluster are connected to the unified database, which is used to store the user information table of all SMB users created under each service node, and the user information table records the user label and user serial number of the corresponding SMB user, the user label indicates the user type of the corresponding SMB user, that is, the independent user in the single node mode and the cluster user in the cluster mode, and the user serial number indicates the serial number of the most recent update of the corresponding SMB user, which can ensure that the most recently updated SMB user with the same name can be retrieved when the user searches. On this basis, after a target SMB user is created, the corresponding user information table in the unified database can be set according to the working mode of the shared service cluster, that is, the user label and user serial number of the SMB user are set, so that the SMB user management in the shared service cluster can be realized according to the user information recorded in each user information table in the unified database. Therefore, the technical solution realizes the simultaneous support of the shared service cluster for the single node mode and the cluster mode, and then realizes the unified management of SMB users by the shared service cluster under two different working modes.

[0048] In one embodiment of the present application, the client can access the shared service cluster by connecting to the SMB user. When the client initiates an SMB connection request for a target SMB user, the service node will first determine whether the target SMB user exists, and perform a password check on the target SMB user when it is determined that the target SMB user exists, thereby achieving an SMB connection between the client and the target SMB user when the check passes, so that the client can access the shared service cluster by connecting to the SMB user, effectively ensuring the security of the shared service cluster. Among them, when it is determined that the target SMB user does not exist, an error prompt will be directly initiated, and the SMB connection request will no longer be processed, ensuring the access efficiency of the shared service cluster.

[0049] The SMB user management device, electronic device, computer-readable storage medium, and computer program product provided in this application also have the above-mentioned technical effects, and this application will not repeat them here. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the prior art and the embodiments of the present application, the drawings required for use in the description of the prior art and the embodiments of the present application are briefly introduced below. Of course, the drawings described below in relation to the embodiments of the present application are only part of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work, and the obtained other drawings also belong to the protection scope of the present application.

[0051] Figure 1 A schematic diagram of the structure of a shared service cluster provided for this application;

[0052] Figure 2 A flowchart of an SMB user management method provided in this application;

[0053] Figure 3 A layout diagram of a unified database provided for this application;

[0054] Figure 4 A schematic diagram of the structure of an SMB user management device provided by this application;

[0055] Figure 5 A schematic diagram of the structure of an electronic device provided in this application. DETAILED DESCRIPTION

[0056] The core of the present application is to provide an SMB user management method, which can realize the simultaneous support of the shared service cluster for single-node mode and cluster mode, thereby realizing the unified management of SMB users by the shared service cluster under two different working modes; another core of the present application is to provide an SMB user management device, an electronic device, a computer-readable storage medium and a computer program product, all of which have the above-mentioned beneficial effects.

[0057] In order to describe the technical solutions in the embodiments of the present application more clearly and completely, the technical solutions in the embodiments of the present application will be introduced below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0058] An embodiment of the present application provides an SMB user management method.

[0059] First, please refer to Figure 1 , Figure 1 A structural diagram of a shared service cluster provided by the present application, wherein multiple service nodes are deployed in the shared service cluster, and all service nodes are connected to a unified database. Each service node can create an SMB user to provide shared services for each SMB user. The unified database is used to store user information tables of all SMB users in the shared service cluster, and SMB users correspond to user information tables one-to-one, that is, one SMB user corresponds to one user information table, and the user information table records the user label and user serial number of each SMB user, wherein the user label indicates the user type of the corresponding SMB user, such as an independent user in single-node mode and a cluster user in cluster mode, and the user serial number indicates the most recently updated serial number of the corresponding SMB user, which is used to ensure that the most recently updated SMB user with the same name is retrieved during user retrieval. The SMB user management method provided in the embodiment of the present application is based on Figure 1 The shared service cluster is implemented as shown.

[0060] For further information, please refer to Figure 2 , Figure 2 A flow chart of an SMB user management method provided in this application, which is applied to Figure 1 For any service node in the shared service cluster, the implementation process may include the following S101 to S104:

[0061] S101: When an SMB user creation command is received, a target SMB user is created according to the SMB user creation command, and a working mode of a shared service cluster is determined; the working modes include a single node mode and a cluster mode.

[0062] This step is intended to achieve the creation of the target SMB user and the determination of the working mode of the shared service cluster. Among them, the target SMB user is the SMB user that needs to be created, which is implemented in response to the SMB user creation command; the working mode of the shared service cluster includes single-node mode and cluster mode. In the traditional technical implementation, the SMB users created by each service node in the single-node mode are all stored in the private database of the corresponding service node, and data cannot be shared between the service nodes; the SMB users created by each service node in the cluster mode are stored in the cluster database, and data sharing can be achieved between the service nodes through the cluster database. Based on this, the traditional Samba service architecture is independent of each other in user management for cluster mode and single-node mode. In this regard, a unified database is created in the embodiment of the present application, whether it is single-node mode or cluster mode, it is used to realize the relevant data storage of the newly created SMB user, so as to realize the simultaneous support of the Samba service architecture for cluster mode and single-node mode.

[0063] S102: If the working mode is the single-node mode, determine the SMB users with the same name as the target SMB user in other service nodes, determine a new serial number according to the serial numbers of the SMB users with the same name, set the user serial number as the new serial number in the user information table corresponding to the target SMB user, and set the user label to an independent user.

[0064] This step is intended to implement the setting of the corresponding user information table in the unified database for the newly created target SMB user in single-node mode, including the setting of the user label and user serial number for the target SMB user. Specifically, since it is a single-node mode, the user label in the user information table can be directly set to an independent user, and for the user serial number, it is possible to first query whether there is an SMB user with the same name as the target SMB user on other service nodes in the shared service cluster. If so, a new serial number can be determined based on the serial numbers of each SMB user with the same name, and the user serial number of the target SMB user can be set to the new serial number. For example, if the serial numbers of the SMB users with the same name as the target SMB user already exist in the shared service cluster, which are 0001, 0002, and 0003, then the user serial number of the target SMB user can be determined to be 0004. Among them, when there is no SMB user with the same name as the target SMB user in the shared service cluster, its user serial number can be directly set to the default initial serial number, such as 0001.

[0065] S103: If the working mode is cluster mode, set the user serial number to the default serial number in the user information table corresponding to the target SMB user, and set the user tag to a cluster user; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated.

[0066] This step is intended to achieve the setting of the corresponding user information table in the unified database for the newly created target SMB user in the cluster mode, including the setting of the user label and user serial number for the target SMB user. Specifically, since it is a cluster mode, the user label in the user information table can be directly set to the cluster user, and for the user serial number, since all service nodes in the cluster mode share the target SMB user, a default serial number can be directly set, and the user serial number in the cluster mode is updated as the user information table is updated. For example, for the newly created target SMB user, its user serial number can be directly set to the default serial number 0001, then, if there is any service node to modify the information of the target SMB user later, the user serial number in its corresponding user information table will be increased one by one on the basis of the default serial number, that is, the user serial number of the target SMB user after the first information modification is 0002, and the user serial number after the second information modification is 0003, and so on.

[0067] S104: Manage each SMB user according to each user information table in the unified database.

[0068] This step is intended to achieve the management of each SMB user in the shared service cluster. Based on the above S101~S103, the user information tables of all newly created SMB users in the shared service cluster are stored in a unified database. The user label in the user information table is used to indicate the user type of the corresponding SMB user, and the user serial number is used to indicate the serial number of the corresponding SMB user's most recent update, so as to ensure that the most recently updated SMB user with the same name can be retrieved during user search. Therefore, unified management of all SMB users in the shared service cluster can be achieved based on each user information table in the unified database. Among them, the management operations on each SMB user may include but are not limited to modification operations, query operations, deletion operations, etc.

[0069] In one embodiment of the present application, when the SMB user management operation is specifically a modification operation, the management of each SMB user according to each user information table in the unified database may include:

[0070] Determine the user data of the SMB user to be modified;

[0071] If the working mode is single-node mode, determine whether there is an SMB user with the same name as the SMB user to be modified locally in the service node; if so, overwrite the original user data of the SMB user with the same name with the user data, and set the user label as an independent user in the user information table corresponding to the SMB user with the same name; if not, execute the step of creating the target SMB user according to the SMB user creation command;

[0072] If the working mode is cluster mode, determine whether there is an SMB user with the same name as the SMB user to be modified in the shared service cluster; if so, use the user data to overwrite the original user data of the SMB user with the same name, set the user label as a cluster user in the user information table corresponding to the SMB user with the same name, and synchronize other service nodes to perform the modification operation; if not, execute the steps of creating the target SMB user according to the SMB user creation command.

[0073] The SMB user management method provided in the embodiment of the present application can be used to implement the modification operation of each SMB user in the shared service cluster, that is, to modify the user data of one or more SMB users. Specifically, after determining the user data of the SMB user to be modified (the user data refers to the modified user data, that is, the new user data), the SMB user can be modified according to the working mode of the shared service cluster, wherein the SMB user to be modified can be specified by the user name.

[0074] In single-node mode, if there is an SMB user with the same name as the SMB user to be modified locally in the current service node, the user data of each SMB user with the same name can be modified. Here, the new user data can be directly used to overwrite the original user data, and the user label of the corresponding user information table is modified to be an independent user. In addition, if there is no SMB user with the same name as the SMB user to be modified locally in the current service node, a new SMB user with the same name can be directly created based on S102.

[0075] In cluster mode, if there is an SMB user with the same name as the SMB user to be modified in the shared service cluster, the user data of each SMB user with the same name can be modified. Here, the new user data can be directly used to overwrite the original user data, and the user label in the corresponding user information table can be modified and set to the cluster user. At the same time, since it is a cluster mode, the same operation can be performed in synchronization with other service nodes to realize SMB user modification. Similarly, if there is no SMB user with the same name as the SMB user to be modified in the shared service cluster, a new SMB user with the same name can be created directly based on S103. In addition, since the modification operation of the SMB user has occurred in the cluster mode, in addition to modifying the user label, the user serial number in the corresponding user information table can also be increased by 1 to realize the update of the user serial number, indicating that the corresponding SMB user has been updated.

[0076] In one embodiment of the present application, when the SMB user management operation is specifically a search operation, the management of each SMB user according to each user information table in the unified database may include:

[0077] Determine the user information of the target SMB user to be queried;

[0078] If the working mode is single node mode, the user information is used to determine whether the target query SMB user exists locally in the service node; if so, the user data of the target query SMB user is output; if not, an error prompt is output;

[0079] If the working mode is cluster mode, the user information is used to determine whether there is a target query SMB user with a user label of cluster user locally in the service node; if so, the user data of the target query SMB user with a user label of cluster user is output; if not, all target query SMB users with a user label of independent users are determined in the shared service cluster, and the target query SMB user with the latest user serial number is determined among all target query SMB users with user labels of independent users, and the user data of the target query SMB user with the latest user serial number is output.

[0080] The SMB user management method provided in the embodiment of the present application can be used to implement the query operation of each SMB user in the shared service cluster, that is, to query the user data of one or more SMB users. Specifically, after determining the user information (such as user name) of the target queried SMB user, the query operation can be performed on the SMB user according to the working mode of the shared service cluster.

[0081] In single-node mode, you can directly query whether the target SMB user exists locally in the current service node based on user information, such as querying whether there is an SMB user with the user name XXX in the current service node. If it exists, its user data is directly returned; if it does not exist, an error prompt is directly output.

[0082] In cluster mode, you can first query whether there is a target query SMB user with a user tag of cluster user in the current service node based on user information, such as querying whether there is an SMB user with the user name XXX and the user tag of cluster user in the current service node. If it exists, its user data is returned directly; if it does not exist, you can continue to query the SMB user with the user tag of independent user and the user serial number of the latest serial number in the shared service cluster as the target query SMB user, and return its user data.

[0083] In one embodiment of the present application, when the SMB user management operation is specifically a deletion operation, the management of each SMB user according to each user information table in the unified database may include:

[0084] Confirm the SMB user to be deleted;

[0085] If the working mode is single node mode, the SMB user with the same name as the SMB user to be deleted in the local service node will be deleted;

[0086] If the working mode is cluster mode, delete the SMB user with the same name as the SMB user to be deleted in the shared service cluster.

[0087] The SMB user management method provided in the embodiment of the present application can be used to implement the deletion operation of each SMB user in the shared service cluster, that is, to delete one or more SMB users. Specifically, after determining the user information (such as user name) of the SMB user to be deleted, the deletion operation can be performed on it according to the working mode of the shared service cluster. Among them, in the single-node mode, the SMB user with the user name XXX created locally in the current service node can be directly deleted; in the cluster mode, the SMB user with the user name XXX created in the shared service cluster can be directly deleted.

[0088] It can be seen that the SMB user management method provided in the embodiment of the present application creates a unified database in the shared service cluster, so that all service nodes in the shared service cluster are connected to the unified database, which is used to store the user information table of all SMB users created under each service node, and the user information table records the user label and user serial number of the corresponding SMB user, the user label indicates the user type of the corresponding SMB user, that is, the independent user in the single node mode and the cluster user in the cluster mode, and the user serial number indicates the serial number of the corresponding SMB user that was last updated, which can ensure that the SMB user with the same name that was last updated can be retrieved when the user searches. On this basis, after a target SMB user is created, the corresponding user information table in the unified database can be set according to the working mode of the shared service cluster, that is, the user label and user serial number of the SMB user are set, so that the SMB user management in the shared service cluster can be realized according to the user information recorded in each user information table in the unified database. Therefore, the technical solution realizes the simultaneous support of the shared service cluster for the single node mode and the cluster mode, and then realizes the unified management of SMB users by the shared service cluster under two different working modes.

[0089] Based on the above embodiments:

[0090] In one embodiment of the present application, when an SMB user creation command is received, after creating a target SMB user according to the SMB user creation command, the following may also be included:

[0091] Determine whether there is a default user group in the shared service cluster;

[0092] If so, executing the step of determining the working mode of the shared service cluster;

[0093] If it does not exist, the target SMB user is set to belong to the default user group, and the user information of the target SMB user is added to the member list of the default user group, and the process returns to the step of creating the target SMB user according to the SMB user creation command when the SMB user creation command is received.

[0094] It is understandable that in Windows or Linux systems, when creating a user, a default user group is generally set, and the default user group is mainly used for permission management. Based on this, when creating an SMB user, after creating an SMB user, you can first determine whether there is a default user group in the shared service cluster. If it does, you can continue to make corresponding settings for its corresponding user information table to achieve complete creation of the SMB user. If it does not exist, you can directly make the target SMB user a member of the default user group and re-create the SMB user. Among them, the number of SMB users in the default user group can be set in advance according to actual needs.

[0095] In one embodiment of the present application, when the service node is a newly added service node, the SMB user management method may further include:

[0096] Determine the working mode of the shared service cluster;

[0097] If the working mode is single node mode, the preset operation is executed;

[0098] If the working mode is cluster mode, the user information of each SMB user whose user tag is cluster user is obtained from the main service node of the shared service cluster and saved locally.

[0099] It is understandable that a shared service cluster consists of multiple service nodes. In actual application scenarios, new nodes are bound to be added and old nodes are removed. For newly added service nodes, preset operations can be performed in single-node mode, such as no processing. In cluster mode, user information of all SMB users with user tags as cluster users in the shared service cluster needs to be obtained and saved locally to achieve information synchronization of cluster SMB users.

[0100] In one embodiment of the present application, the SMB user management method may further include:

[0101] Receive an SMB connection request from a client for a target SMB user;

[0102] Determine whether the target SMB user exists based on the SMB connection request;

[0103] If it does not exist, an error message will be fed back to the client;

[0104] If it exists, a response message is fed back to the client to receive the password data of the target SMB user sent by the client, the password data is verified using the registered password data of the target SMB user, and an SMB connection is established with the client when the verification passes.

[0105] In actual application scenarios, the client can access the shared service cluster by connecting to the SMB user. Specifically, the client can initiate an SMB connection request for a certain SMB user (i.e., the target SMB user mentioned above) to the service node (server), so that the service node can determine whether the target SMB user currently exists based on the SMB connection request. If not, an error prompt can be directly fed back to the client; if it exists, a response message can be fed back to the client, so that the client can send the target SMB user's password data to the service node based on the response message, and thus the service node can verify it using the registered password data of the target SMB user stored locally (the registered password data is the target SMB user registered to the service node when it is created). Obviously, if the verification is successful, the SMB connection request can be responded to to realize the connection between the target SMB user and the client, so that the client can access the shared service cluster through the target SMB user; if the verification fails, the SMB connection request will not be responded to, and the SMB connection will be refused to be established.

[0106] It can be seen that in the embodiment of the present application, the client can access the shared service cluster by connecting to the SMB user. When the client initiates an SMB connection request for a target SMB user, the service node will first determine whether the target SMB user exists, and perform a password verification on the target SMB user when it is determined that the target SMB user exists, thereby realizing the SMB connection between the client and the target SMB user when the verification passes, so that the client can access the shared service cluster by connecting to the SMB user, effectively ensuring the security of the shared service cluster. Among them, when it is determined that the target SMB user does not exist, an error prompt will be directly initiated, and the SMB connection request will no longer be processed, ensuring the access efficiency of the shared service cluster.

[0107] In one embodiment of the present application, the above-mentioned feedback of response information to the client to receive the password data of the target SMB user sent by the client, verifying the password data using the registered password data of the target SMB user, and establishing an SMB connection with the client when the verification passes, includes:

[0108] Feedback response information to the client, so that the client performs a hash operation on the user password of the target SMB user according to the response information to obtain the password data;

[0109] Receive the target SMB user's password data fed back by the client;

[0110] Perform hash operation on the registration password of the target SMB user stored locally to obtain the registration password data;

[0111] Determine whether the registered password data and the password data are consistent; if they are consistent, the verification is passed, and the target SMB user is controlled to establish an SMB connection with the client; if they are inconsistent, the verification fails.

[0112] The embodiment of the present application provides a verification method for SMB user password information, namely a verification method based on a hash algorithm. Specifically, the client can first perform a hash calculation on the user password of the target SMB user and then send it to the service node, and the service node can perform a hash calculation on the registration password of the target SMB user and then verify the password data sent by the client.

[0113] It can be seen that the embodiment of the present application implements password verification based on ciphertext by performing hash operation on password information, effectively ensuring the security of user passwords from being leaked, and further ensuring the security of the shared service cluster.

[0114] Based on the above embodiments, the present application embodiment provides another SMB user management method, and the implementation process of the SMB user management method is as follows:

[0115] First, if Figure 1 The shared service cluster shown in the figure, the SMB user management method provided in the embodiment of the present application is implemented based on the shared service cluster. Figure 3 , Figure 3 The layout diagram of a unified database provided by the present application can realize the purpose of SMB user modification and use not affecting each other in single-node mode, SMB user modification and use taking effect on all service nodes in cluster mode, and users can correctly retrieve modifications when switching back and forth between single-node mode and cluster mode, based on the user information tables in the unified database. The meanings of the fields in the user information table are as follows:

[0116] (1) User flag: STANDLONE indicates a single-node user, and CLUSTER indicates a cluster user;

[0117] (2) User node ID: used to determine which service node the user operation is performed on. Since the database is distributed, the data added by each service node is directly visible in another service node. Here, node ID is used to distinguish between service nodes.

[0118] (3) User serial number sn: It is used to identify the most recently updated serial number of an SMB user. This serial number can ensure that the most recently updated SMB user with the same name can be used when searching for SMB users.

[0119] (4) User data: the specific content data of the corresponding SMB user.

[0120] Furthermore, the SMB user management method provided in the embodiment of the present application is introduced in detail below according to the processes of SMB user creation, modification, retrieval, deletion, and application.

[0121] 1. SMB user creation:

[0122] (1) Execute the SMB user creation command, enter the user password, and create a basic SMB user that does not include any additional information;

[0123] (2) After receiving the creation command, the user management module parses the username and password text, then performs MD4 HASH calculation on the plain text password and saves it for subsequent client access authentication;

[0124] (3) Determine whether there is a default Users group in the shared service cluster. The Users group is one of the default groups built into the Windows system. Therefore, the implementation of the SMB protocol needs to support this default group. If it does not exist, the user management module first automatically creates the Users group and then assigns the newly added SMB user to the Users group. This involves two actions:

[0125] a. Set all groups of SMB users to Users;

[0126] b. Add the SMB user to the member list of the Users group;

[0127] After adding, users can also create new user groups and modify the user group information of existing SMB users;

[0128] (4) Determine the currently set Samba working mode:

[0129] If it is a single-node mode, add a new user and set the mark as STANDLONE, collect the user serial numbers of the SMB users with the same name of the remaining service nodes, and determine the latest sn serial number as the user serial number of the current new user;

[0130] If it is cluster mode, add a new user and set the tag to CLUSTER, then the sn sequence number starts from 1. The next time another service node updates the SMB user's information, the sequence number is automatically incremented.

[0131] 2. SMB user modification:

[0132] (1) In single-node mode, if there is a user with the same name, regardless of whether it has the STANDLONE or CLUSTER mark, the new user data will be used to uniformly overwrite the original user data of the user with the same name and the mark will be changed to STANDLONE. Otherwise, the new user will be added directly according to step 1;

[0133] (2) In cluster mode, if there is a user with the same name, regardless of whether it is marked with STANDLONE or CLUSTER, the new user data will be used to uniformly overwrite the original user data of the user with the same name, and the mark will be changed to CLUSTER. Otherwise, the new user will be added directly according to step 1. At the same time, this operation will be performed on all service nodes to ensure that each service node has a copy of the latest user record.

[0134] 3. SMB user retrieval:

[0135] (1) In single-node mode, first check whether the target search user exists in this service node. If it exists, regardless of whether it has the STANDLONE or CLUSTER mark, directly return its user data; if it does not exist, directly report an error;

[0136] (2) In cluster mode, first check whether there is an SMB user with the CLUSTER mark in this service node. If so, return its user data directly; if not, collect SMB users with the STANDLONE mark in all service nodes, and determine the SMB user with the latest sn sequence number as the final SMB user and return its user data, thereby realizing the SMB user merging from single-node mode to cluster mode.

[0137] 4. SMB user deletion:

[0138] (1) In single-node mode, only the SMB users with the same name of this service node will be deleted, regardless of whether they are marked with STANDLONE or CLUSTER;

[0139] (2) In cluster mode, traverse all service nodes and delete all SMB users with the same name, regardless of whether they are marked with STANDLONE or CLUSTER.

[0140] 5. New service nodes added:

[0141] (1) In single-node mode, when a new service node is added, no processing is done on the user records in the unified database;

[0142] (2) In cluster mode, when a new service node is added, the Samba service of the new service node automatically pulls the latest CLUSTER user information from the cluster master node and saves it locally.

[0143] 6. SMB user use:

[0144] After adding an SMB user to the database, you can use the Windows client or other Linux clients that support the SMB protocol to access the shared service using the SMB user. The implementation process is as follows:

[0145] (1) The client uses the SMB user to initiate an SMB connection request. The server first checks whether the SMB user exists. If not, it directly returns a user-existing error to the client.

[0146] (2) If it exists, the server returns a Challenge response, and the client uses the Challenge response to further encrypt the user password HASH and send it to the server;

[0147] (3) The server uses the same algorithm to perform the same calculation on the locally stored password HASH. If it is consistent with the ciphertext field sent by the user, the verification passes. Otherwise, the verification fails.

[0148] (4) When verification passes, an SMB connection is established to enable access to the shared service cluster.

[0149] As can be seen from this, the present embodiment, by designing a user information table of a specific format, ensures the correct conversion of SMB users in the two modes of single node mode and cluster mode of Samba service, and solves the deficiency that the existing Samba service cannot carry out unified management of two kinds of SMB local users. From the user's perspective, no matter it is single node mode or cluster mode, the SMB user who adds, modifies and deletes in a kind of working mode can be seamlessly switched to take effect in another kind of working mode. On this basis, the whole technology realizes the use of an integrated management mechanism, while centrally and uniformly managing user data, reduces the problem of excessive fragmentation of user data storage, has a very obvious positive effect on the stability of the Linux end Samba service and the ease of use of SMB sharing, and has a very high use value for the centralized and unified management of SMB local users in enterprises.

[0150] It can be seen that the SMB user management method provided in the embodiment of the present application creates a unified database in the shared service cluster, so that all service nodes in the shared service cluster are connected to the unified database, which is used to store the user information table of all SMB users created under each service node, and the user information table records the user label and user serial number of the corresponding SMB user, the user label indicates the user type of the corresponding SMB user, that is, the independent user in the single node mode and the cluster user in the cluster mode, and the user serial number indicates the serial number of the corresponding SMB user that was last updated, which can ensure that the SMB user with the same name that was last updated can be retrieved when the user searches. On this basis, after a target SMB user is created, the corresponding user information table in the unified database can be set according to the working mode of the shared service cluster, that is, the user label and user serial number of the SMB user are set, so that the SMB user management in the shared service cluster can be realized according to the user information recorded in each user information table in the unified database. Therefore, the technical solution realizes the simultaneous support of the shared service cluster for the single node mode and the cluster mode, and then realizes the unified management of SMB users by the shared service cluster under two different working modes.

[0151] An embodiment of the present application provides an SMB user management device.

[0152] Please refer to Figure 4 , Figure 4 This is a structural diagram of an SMB user management device provided by the present application. The SMB user management device is applied to any service node in a shared service cluster. All service nodes in the shared service cluster are connected to a unified database. The unified database is used to store user information tables of all SMB users in the shared service cluster. The SMB user management device may include:

[0153] Determine module 1, for, when receiving an SMB user creation command, creating a target SMB user according to the SMB user creation command, and determining a working mode of the shared service cluster; the working modes include a single node mode and a cluster mode;

[0154] The first setting module 2 is used for, if the working mode is the single-node mode, determining the SMB users with the same name as the target SMB user in other service nodes, determining the new serial number according to the serial numbers of the SMB users with the same name, setting the user serial number as the new serial number in the user information table corresponding to the target SMB user, and setting the user label as an independent user;

[0155] The second setting module 3 is used to set the user serial number as the default serial number in the user information table corresponding to the target SMB user and set the user tag as a cluster user if the working mode is the cluster mode; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated;

[0156] The management module 4 is used to manage each SMB user according to each user information table in the unified database.

[0157] It can be seen that the SMB user management device provided in the embodiment of the present application creates a unified database in the shared service cluster, so that all service nodes in the shared service cluster are connected to the unified database, which is used to store the user information table of all SMB users created under each service node, and the user information table records the user label and user serial number of the corresponding SMB user, the user label indicates the user type of the corresponding SMB user, that is, the independent user in the single node mode and the cluster user in the cluster mode, and the user serial number indicates the serial number of the most recent update of the corresponding SMB user, which can ensure that the most recently updated SMB user with the same name can be retrieved when the user searches. On this basis, after a target SMB user is created, the corresponding user information table in the unified database can be set according to the working mode of the shared service cluster, that is, the user label and user serial number of the SMB user are set, so that the SMB user management in the shared service cluster can be realized according to the user information recorded in each user information table in the unified database. Therefore, the technical solution realizes the simultaneous support of the shared service cluster for the single node mode and the cluster mode, and then realizes the unified management of SMB users by the shared service cluster under two different working modes.

[0158] In one embodiment of the present application, when the SMB user management operation is specifically a modification operation, the management module 4 may be specifically used to:

[0159] Determine the user data of the SMB user to be modified;

[0160] If the working mode is single-node mode, determine whether there is an SMB user with the same name as the SMB user to be modified locally in the service node; if so, overwrite the original user data of the SMB user with the same name with the user data, and set the user label as an independent user in the user information table corresponding to the SMB user with the same name; if not, execute the step of creating the target SMB user according to the SMB user creation command;

[0161] If the working mode is cluster mode, determine whether there is an SMB user with the same name as the SMB user to be modified in the shared service cluster; if so, use the user data to overwrite the original user data of the SMB user with the same name, set the user label as a cluster user in the user information table corresponding to the SMB user with the same name, and synchronize other service nodes to perform the modification operation; if not, execute the steps of creating the target SMB user according to the SMB user creation command.

[0162] In one embodiment of the present application, when the SMB user management operation is specifically a retrieval operation, the management module 4 may be specifically used to:

[0163] Determine the user information of the target SMB user to be queried;

[0164] If the working mode is single node mode, the user information is used to determine whether the target query SMB user exists locally in the service node; if so, the user data of the target query SMB user is output; if not, an error prompt is output;

[0165] If the working mode is cluster mode, the user information is used to determine whether there is a target query SMB user with a user label of cluster user locally in the service node; if so, the user data of the target query SMB user with a user label of cluster user is output; if not, all target query SMB users with a user label of independent users are determined in the shared service cluster, and the target query SMB user with the latest user serial number is determined among all target query SMB users with user labels of independent users, and the user data of the target query SMB user with the latest user serial number is output.

[0166] In one embodiment of the present application, when the SMB user management operation is specifically a deletion operation, the management module 4 may be specifically used to:

[0167] Confirm the SMB user to be deleted;

[0168] If the working mode is single node mode, the SMB user with the same name as the SMB user to be deleted in the local service node will be deleted;

[0169] If the working mode is cluster mode, delete the SMB user with the same name as the SMB user to be deleted in the shared service cluster.

[0170] In one embodiment of the present application, the SMB user management device may also include a user group creation module, which is used to determine whether there is a default user group in the shared service cluster after creating the target SMB user according to the SMB user creation command when the SMB user creation command is received; if so, execute the step of determining the working mode of the shared service cluster; if not, set the target SMB user to belong to the default user group, and add the user information of the target SMB user to the member list of the default user group, and return to the step of creating the target SMB user according to the SMB user creation command when the SMB user creation command is received.

[0171] In one embodiment of the present application, the SMB user management device may also include a cluster update module, which is used to determine the working mode of the shared service cluster when the service node is a newly joined service node; if the working mode is a single node mode, a preset operation is executed; if the working mode is a cluster mode, the user information of each SMB user with a user label as a cluster user is obtained from the main service node of the shared service cluster and saved locally.

[0172] In one embodiment of the present application, the SMB user management device may also include an application module for receiving an SMB connection request from a client for a target SMB user; determining whether the target SMB user exists based on the SMB connection request; if not, feeding back an error prompt to the client; if so, feeding back a response message to the client to receive password data of the target SMB user sent by the client, verifying the password data using the registered password data of the target SMB user, and establishing an SMB connection with the client when the verification passes.

[0173] For an introduction to the device provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0174] An embodiment of the present application provides an electronic device.

[0175] Please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application, and the electronic device may include:

[0176] A memory 11, used for storing computer programs;

[0177] The processor 10 can implement the steps of any one of the above-mentioned SMB user management methods when executing a computer program.

[0178] like Figure 5, which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 10, a memory 11, a communication interface 12 and a communication bus 13. The processor 10, the memory 11 and the communication interface 12 all communicate with each other through the communication bus 13.

[0179] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.

[0180] The processor 10 may call a program stored in the memory 11. Specifically, the processor 10 may execute operations in an embodiment of the SMB user management method.

[0181] The memory 11 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 11 at least stores programs for implementing the following functions:

[0182] When receiving an SMB user creation command, a target SMB user is created according to the SMB user creation command, and the working mode of the shared service cluster is determined; the working modes include single-node mode and cluster mode;

[0183] If the working mode is single-node mode, determine the SMB users with the same name as the target SMB user in other service nodes, determine the new serial number according to the serial numbers of each SMB user with the same name, set the user serial number to the new serial number in the user information table corresponding to the target SMB user, and set the user label to an independent user;

[0184] If the working mode is cluster mode, the user serial number is set as the default serial number in the user information table corresponding to the target SMB user, and the user tag is set as a cluster user; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated;

[0185] Each SMB user is managed according to the user information table in the unified database.

[0186] In a possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0187] In addition, the memory 11 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0188] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0189] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 5 More or fewer components than shown, or combinations of certain components.

[0190] An embodiment of the present application provides a computer-readable storage medium.

[0191] The computer-readable storage medium provided in the embodiment of the present application stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above-mentioned SMB user management methods can be implemented.

[0192] Among them, the computer-readable storage medium can be any available medium that can be stored in a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, it can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape, etc.), an optical medium (such as a DVD) or a semiconductor medium (such as a solid-state hard disk) and other media that can store computer program codes.

[0193] For an introduction to the computer-readable storage medium provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0194] An embodiment of the present application provides a computer program product.

[0195] The computer program product provided in the embodiments of the present application includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of any one of the above-mentioned SMB user management methods can be implemented.

[0196] Specifically, in the above embodiments, all or part of them can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of them can be implemented in the form of a computer program product.

[0197] Among them, the computer program product may include one or more computer programs / instructions, and when the computer program / instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application may be generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line, etc.) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0198] For an introduction to the computer program product provided in the embodiments of the present application, please refer to the above method embodiments, and the present application will not elaborate on them here.

[0199] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0200] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0201] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0202] The technical solution provided by the present application is described in detail above. The principle and implementation method of the present application are described in detail using specific examples herein, and the description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A SMB user management method, characterized in that: Applied to any service node in a shared service cluster, all service nodes in the shared service cluster are connected to a unified database, and the unified database is used to store user information tables of all SMB users in the shared service cluster. The method includes: When receiving an SMB user creation command, creating a target SMB user according to the SMB user creation command, and determining a working mode of the shared service cluster; the working mode includes a single node mode and a cluster mode; If the working mode is the single-node mode, determine the SMB users with the same name as the target SMB user in each of the other service nodes, determine a new serial number according to the serial numbers of each of the SMB users with the same name, set the user serial number as the new serial number in the user information table corresponding to the target SMB user, and set the user label as an independent user; If the working mode is the cluster mode, the user serial number is set as the default serial number in the user information table corresponding to the target SMB user, and the user tag is set as a cluster user; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated; Each of the SMB users is managed according to each user information table in the unified database.

2. The SMB user management method according to claim 1, characterized in that: When the SMB user management operation is specifically a modification operation, managing each SMB user according to each user information table in the unified database includes: Determine the user data of the SMB user to be modified; If the working mode is the single-node mode, determine whether there is an SMB user with the same name as the SMB user to be modified locally in the service node; if so, overwrite the original user data of the SMB user with the same name with the user data, and set the user label as an independent user in the user information table corresponding to the SMB user with the same name; if not, execute the step of creating a target SMB user according to the SMB user creation command; If the working mode is the cluster mode, determine whether there is an SMB user with the same name as the SMB user to be modified in the shared service cluster; if so, use the user data to overwrite the original user data of the SMB user with the same name, and set the user label as a cluster user in the user information table corresponding to the SMB user with the same name, and synchronize other service nodes to perform the modification operation; if not, execute the step of creating the target SMB user according to the SMB user creation command.

3. The SMB user management method according to claim 1, characterized in that: When the SMB user management operation is specifically a retrieval operation, managing each SMB user according to each user information table in the unified database includes: Determine the user information of the target SMB user to be queried; If the working mode is the single node mode, the user information is used to determine whether the target query SMB user exists locally in the service node; if so, the user data of the target query SMB user is output; if not, an error prompt is output; If the working mode is the cluster mode, the user information is used to determine whether there is a target query SMB user with a user label of a cluster user locally in the service node; if so, the user data of the target query SMB user with a user label of a cluster user is output; if not, all target query SMB users with a user label of an independent user are determined in the shared service cluster, and the target query SMB user with a user serial number of the latest serial number is determined among all target query SMB users with a user label of an independent user, and the user data of the target query SMB user with a user serial number of the latest serial number is output.

4. The SMB user management method according to claim 1, characterized in that: When the SMB user management operation is specifically a deletion operation, managing each SMB user according to each user information table in the unified database includes: Confirm the SMB user to be deleted; If the working mode is the single node mode, deleting the SMB user with the same name as the SMB user to be deleted in the local service node; If the working mode is the cluster mode, the SMB users with the same name as the SMB user to be deleted in the shared service cluster are deleted.

5. The SMB user management method according to claim 1, characterized in that: When receiving the SMB user creation command, after creating the target SMB user according to the SMB user creation command, the method further includes: Determine whether there is a default user group in the shared service cluster; If so, executing the step of determining the working mode of the shared service cluster; If not, the target SMB user is set to belong to the default user group, and the user information of the target SMB user is added to the member list of the default user group, and the process returns to the step of creating the target SMB user according to the SMB user creation command when an SMB user creation command is received.

6. The SMB user management method according to claim 1, characterized in that: When the service node is a newly added service node, the method further includes: Determining a working mode of the shared service cluster; If the working mode is the single node mode, executing the preset operation; If the working mode is the cluster mode, the user information of each of the SMB users whose user tag is a cluster user is obtained from the main service node of the shared service cluster and saved locally.

7. The SMB user management method according to any one of claims 1 to 6, characterized in that: Also includes: Receive an SMB connection request from a client for the target SMB user; Determine whether the target SMB user exists according to the SMB connection request; If it does not exist, an error message is fed back to the client; If so, a response message is fed back to the client to receive the password data of the target SMB user sent by the client, verify the password data using the registered password data of the target SMB user, and establish an SMB connection with the client when the verification passes.

8. An SMB user management device, characterized in that: Applied to any service node in a shared service cluster, all service nodes in the shared service cluster are connected to a unified database, the unified database is used to store user information tables of all SMB users in the shared service cluster, the device comprises: A determination module, configured to, when receiving an SMB user creation command, create a target SMB user according to the SMB user creation command, and determine a working mode of the shared service cluster; the working mode includes a single node mode and a cluster mode; A first setting module is used for, if the working mode is the single-node mode, determining SMB users with the same name as the target SMB user in each of the other service nodes, determining a new serial number according to the serial numbers of each of the SMB users with the same name, setting the user serial number as the new serial number in the user information table corresponding to the target SMB user, and setting the user label as an independent user; A second setting module is used for setting the user serial number as a default serial number and the user tag as a cluster user in the user information table corresponding to the target SMB user if the working mode is the cluster mode; wherein the user serial number in the cluster mode is updated as the corresponding user information table is updated; The management module is used to manage each of the SMB users according to each user information table in the unified database.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the SMB user management method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the SMB user management method according to any one of claims 1 to 7 are implemented.