CN113868194B - Management method, device, system and medium for local user group of storage equipment - Google Patents
Management method, device, system and medium for local user group of storage equipment Download PDFInfo
- Publication number
- CN113868194B CN113868194B CN202111056685.8A CN202111056685A CN113868194B CN 113868194 B CN113868194 B CN 113868194B CN 202111056685 A CN202111056685 A CN 202111056685A CN 113868194 B CN113868194 B CN 113868194B
- Authority
- CN
- China
- Prior art keywords
- user group
- storage device
- local user
- domain control
- deleted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007726 management method Methods 0.000 title description 9
- 238000000034 method Methods 0.000 claims abstract description 46
- 238000004590 computer program Methods 0.000 claims description 12
- 238000012217 deletion Methods 0.000 claims description 6
- 230000037430 deletion Effects 0.000 claims description 6
- 230000000903 blocking effect Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
- G06F16/162—Delete operations
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method, a device, a system and a computer readable storage medium for managing a local user group of a storage device, wherein the method comprises the following steps: before deleting the local user group to be deleted, acquiring a backup file corresponding to a service search sequence file of the storage device before the storage device joins the domain control; searching the user information in the backup file, and judging whether the users belonging to the local user group to be deleted exist or not; if not, deleting the local user group; because the backup file is searched, and the backup file only comprises the local user of the storage device and does not contain the domain control user added with the domain control, the invention can effectively shorten the searching time, improve the searching efficiency, reduce the task blocking risk and improve the system performance in the using process.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a system, and a computer readable storage medium for managing a local user group of a storage device.
Background
In the prior art, after a storage device joins a domain control (such as an AD (Active Directory) domain), when a deletion operation is performed on a local user group, all user information in a service search order file (nsswithch. Conf) needs to be searched to determine whether a user belonging to the local user group exists, but because after the storage device joins the domain control, relevant user information of the domain control is added in the nsswithch. Conf file, and because the number of users of the domain control is larger, the search time is too long, resulting in overtime of command execution time and task blocking.
In view of this, how to provide a method, apparatus, system and computer readable storage medium for managing a storage device local user group that solves the above technical problems is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a management method, a device and a system for a local user group of storage equipment and a computer readable storage medium, which can effectively shorten the search time, improve the search efficiency, reduce the task blocking risk and improve the system performance in the use process.
In order to solve the above technical problems, an embodiment of the present invention provides a method for managing a local user group of a storage device, including:
before deleting a local user group to be deleted, acquiring a backup file corresponding to a service search sequence file of a storage device before the storage device joins a domain control;
searching the user information in the backup file, and judging whether the user belonging to the local user group to be deleted exists or not;
and if not, deleting the local user group to be deleted.
Optionally, before the obtaining, before the storage device joins the domain control, the backup file corresponding to the service search order file of the storage device further includes:
and judging whether the storage equipment is added with the domain control, if so, executing the step of acquiring the backup file corresponding to the service search sequence file of the storage equipment before the storage equipment is added with the domain control.
Optionally, the process of determining whether the storage device has joined the domain control is:
acquiring a domain control zone bit corresponding to the storage equipment;
and judging whether the storage equipment is added with domain control according to the domain control flag bit.
Optionally, the method further comprises:
and after the storage device is added into the domain control, modifying the domain control flag bit of the storage device.
Optionally, the process of judging whether the storage device has joined the domain control according to the domain control flag bit is:
the domain control flag bit is 0, and the storage device is not added with domain control;
and if the domain control flag bit is 1, the storage device is added with domain control.
Optionally, the user information includes a user group ID to which the user belongs;
the process of searching the user information in the backup file and judging whether the user belonging to the local user group to be deleted is included in the process of judging whether the user belongs to the local user group to be deleted is as follows:
and searching each piece of user information in the backup file according to the user group ID of the local user group to be deleted to determine whether the user belonging to the local user group to be deleted exists.
Optionally, the searching process for each piece of user information in the backup file includes:
and traversing the user information in the backup file.
The embodiment of the invention also provides a device for managing the local user group of the storage equipment, which comprises:
the acquisition module is used for acquiring backup files corresponding to the service search sequence files of the storage equipment before the storage equipment joins the domain control before the deletion operation is carried out on the local user group to be deleted;
the searching module is used for searching the user information in the backup file, judging whether the user belonging to the local user group to be deleted exists or not, and triggering the deleting module if the user belonging to the local user group to be deleted does not exist;
and the deleting module is used for deleting the local user group to be deleted.
The embodiment of the invention also provides a management system of the local user group of the storage device, which comprises the following steps:
a memory for storing a computer program;
and a processor for implementing the steps of the method for managing a storage device local user group as described above when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the method for managing the local user group of the storage device when being executed by a processor.
The embodiment of the invention provides a method, a device, a system and a computer readable storage medium for managing a local user group of storage equipment, wherein the method comprises the following steps: before deleting the local user group to be deleted, acquiring a backup file corresponding to a service search sequence file of the storage device before the storage device joins the domain control; searching the user information in the backup file, and judging whether the users belonging to the local user group to be deleted exist or not; if not, the local user group is deleted.
Therefore, in the embodiment of the invention, the service search sequence file of the storage device is backed up to obtain the backup file before the storage device is added into the domain control, then the backup file is obtained before the local user group to be deleted is deleted, and each user information in the backup file is searched to determine whether the user belonging to the local user group to be deleted exists.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for managing a local user group of a storage device according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a management apparatus for a local user group of a storage device according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a management method, a device, a system and a computer readable storage medium for a local user group of storage equipment, which can effectively shorten the search time, improve the search efficiency, reduce the task blocking risk and improve the system performance in the use process.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for managing a local user group of a storage device according to an embodiment of the present invention. The method comprises the following steps:
s110: before deleting the local user group to be deleted, acquiring a backup file corresponding to a service search sequence file of the storage device before the storage device joins the domain control;
it should be noted that, in the embodiment of the present invention, the local user group to be deleted is used as the local user group to be deleted, and before the storage device is added to the domain control, the service search sequence file nsswithch. Conf of the storage device is backed up to obtain a corresponding backup file, where the backup file only includes the user information of the local user of the storage device, after the storage device is added to the domain control, the service search sequence file of the storage device is modified, that is, the user information related to the domain control is added to the service search sequence file, and if the storage device is not added to the domain control, the backup of the service search sequence file of the storage device is not required.
Specifically, before the deletion operation is performed on the local user group to be deleted of the storage device, a backup file that is backed up by searching the sequential files for services of the storage device before the storage device joins the domain control may be obtained first.
Further, before the step S110 of obtaining the backup file corresponding to the service search order file of the storage device before the storage device joins the domain control, the method may further include:
and judging whether the storage equipment is added with the domain control, if so, executing the step of acquiring the backup file corresponding to the service search sequence file of the storage equipment before the storage equipment is added with the domain control.
It can be understood that when the local user group to be deleted is to be deleted, whether the storage device has added a domain control can be judged first, and after the fact that the storage device has added a domain control is determined, the fact that the operation of backing up the service search sequence file of the storage device has been executed before the storage device has added a domain control is indicated, and the corresponding backup file exists, so that the corresponding backup file can be obtained, if the storage device has not added a domain control, the fact that the service search sequence file of the storage device is not backed up is indicated, and the service search sequence file is not modified, so that the service search sequence file of the storage device can be directly obtained before the local user group to be deleted is deleted.
Further, the above process of determining whether the storage device has joined the domain control may specifically be:
acquiring a domain control zone bit corresponding to the storage equipment;
and judging whether the storage equipment is added into the domain control according to the domain control flag bit.
It should be noted that, in the embodiment of the present invention, a Domain control flag bit Domain may be added to a storage device, and a Domain control flag bit of a local storage device may be read through a getpwent system call interface, and then whether the storage device is added with a Domain control is determined according to the Domain control flag bit.
S120: searching the user information in the backup file, and judging whether the users belonging to the local user group to be deleted exist or not; if not, then S130 is entered;
after the backup file is obtained, searching each piece of user information (i.e., local user information) in the backup file to determine whether user information corresponding to the local user group to be deleted exists in the pieces of user information, if so, the existence of the user belongs to the local user group to be deleted, the local user group to be deleted is in a used state, and if not, the existence of the user belonging to the local user group to be deleted is indicated, and the local user group to be deleted is in an idle state.
Specifically, the user information in the embodiment of the present invention may include a user group ID to which the user belongs; and searching each piece of user information in the backup file according to the user group ID of the local user group to be deleted so as to determine whether the user belonging to the local user group to be deleted exists, specifically, traversing each piece of user information in the backup file, and determining whether the user group ID of the user belonging to the user information is consistent with the user group ID of the local user group to be deleted or not one by one, if so, indicating that the user corresponding to the user information belongs to the local user group to be deleted, and if not, indicating that the user corresponding to the user information does not belong to the local user group to be deleted.
S130: and deleting the local user group to be deleted.
Specifically, when it is determined that there is no user corresponding to the local user group to be deleted, the local user group to be deleted may be deleted.
Therefore, in the embodiment of the invention, the service search sequence file of the storage device is backed up to obtain the backup file before the storage device is added into the domain control, then the backup file is obtained before the local user group to be deleted is deleted, and each user information in the backup file is searched to determine whether the user belonging to the local user group to be deleted exists.
On the basis of the above embodiment, the embodiment of the present invention further provides a device for managing a local user group of a storage device, and refer to fig. 2 specifically. The device comprises:
an obtaining module 21, configured to obtain, before performing a deletion operation on a local user group to be deleted, a backup file corresponding to a service search order file of a storage device before the storage device joins a domain control;
the searching module 22 is configured to search each piece of user information in the backup file, determine whether a user belonging to the local user group to be deleted exists, and if not, trigger the deleting module 23;
the deleting module 23 is configured to delete the local user group to be deleted.
It should be noted that, the management apparatus for a storage device local user group provided in the embodiment of the present invention has the same advantages as the management method for a storage device local user group provided in the above embodiment, and for the specific description of the management method for a storage device local user group related in the embodiment of the present invention, please refer to the above embodiment, and the disclosure is not repeated herein.
On the basis of the above embodiment, the embodiment of the present invention further provides a system for managing a local user group of a storage device, where the system includes:
a memory for storing a computer program;
and a processor for implementing the steps of the method for managing the local user group of the storage device when executing the computer program.
For example, the processor in the embodiment of the present invention may be specifically configured to obtain, before performing a deletion operation on a local user group to be deleted, a backup file corresponding to a service search order file of a storage device before the storage device joins a domain control; searching the user information in the backup file, and judging whether the users belonging to the local user group to be deleted exist or not; if not, the local user group is deleted.
On the basis of the above embodiment, the embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for managing a local user group of a storage device as described above.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer 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 points refer to the description of the method section.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. A method for managing a local user group of a storage device, comprising:
before deleting a local user group to be deleted, acquiring a backup file corresponding to a service search sequence file of a storage device before the storage device joins a domain control;
searching the user information in the backup file, and judging whether the user belonging to the local user group to be deleted exists or not;
if not, deleting the local user group to be deleted; wherein:
the user information comprises a user group ID to which the user belongs;
the process of searching the user information in the backup file and judging whether the user belonging to the local user group to be deleted exists is as follows:
and searching each piece of user information in the backup file according to the user group ID of the local user group to be deleted so as to determine whether the user belonging to the local user group to be deleted exists.
2. The method of claim 1, further comprising, prior to said obtaining a backup file corresponding to a service search order file of a storage device before the storage device joins a domain control:
and judging whether the storage equipment is added with the domain control, if so, executing the step of acquiring the backup file corresponding to the service search sequence file of the storage equipment before the storage equipment is added with the domain control.
3. The method for managing a local user group of a storage device according to claim 2, wherein the process for determining whether the storage device has joined a domain control is:
acquiring a domain control zone bit corresponding to the storage equipment;
and judging whether the storage equipment is added with domain control according to the domain control flag bit.
4. A method of managing a local user group of a storage device according to claim 3, further comprising:
and after the storage device is added into the domain control, modifying the domain control flag bit of the storage device.
5. The method for managing a local user group of a storage device according to claim 3, wherein the process of determining whether the storage device has joined a domain control according to the domain control flag bit is:
the domain control flag bit is 0, and the storage device is not added with domain control;
and if the domain control flag bit is 1, the storage device is added with domain control.
6. The method for managing a local user group of a storage device according to claim 1, wherein the process of searching for the user information in the backup file is:
and traversing the user information in the backup file.
7. A storage device local user group management apparatus, comprising:
the acquisition module is used for acquiring backup files corresponding to the service search sequence files of the storage equipment before the storage equipment joins the domain control before the deletion operation is carried out on the local user group to be deleted;
the searching module is used for searching the user information in the backup file, judging whether the user belonging to the local user group to be deleted exists or not, and triggering the deleting module if the user belonging to the local user group to be deleted does not exist;
the deleting module is used for deleting the local user group to be deleted; wherein:
the user information comprises a user group ID to which the user belongs;
the process of searching the user information in the backup file and judging whether the user belonging to the local user group to be deleted exists is as follows:
and searching each piece of user information in the backup file according to the user group ID of the local user group to be deleted so as to determine whether the user belonging to the local user group to be deleted exists.
8. A system for managing a local group of users of a storage device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for managing a local user group of a storage device according to any one of claims 1 to 6 when executing said computer program.
9. A computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the method of managing a local user group of a storage device according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111056685.8A CN113868194B (en) | 2021-09-09 | 2021-09-09 | Management method, device, system and medium for local user group of storage equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111056685.8A CN113868194B (en) | 2021-09-09 | 2021-09-09 | Management method, device, system and medium for local user group of storage equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113868194A CN113868194A (en) | 2021-12-31 |
CN113868194B true CN113868194B (en) | 2024-01-23 |
Family
ID=78995203
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111056685.8A Active CN113868194B (en) | 2021-09-09 | 2021-09-09 | Management method, device, system and medium for local user group of storage equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113868194B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115834532B (en) * | 2023-01-19 | 2023-05-05 | 苏州浪潮智能科技有限公司 | Mapping method, device, equipment and medium for AD domain user to storage system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150921A (en) * | 2018-11-05 | 2019-01-04 | 郑州云海信息技术有限公司 | A kind of login method of multi-node cluster, device, equipment and storage medium |
CN111181935A (en) * | 2019-12-19 | 2020-05-19 | 广东电网有限责任公司 | Method for batch adding and timed deleting domain users in AD domain security group |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7958543B2 (en) * | 2005-07-12 | 2011-06-07 | Microsoft Corporation | Account synchronization for common identity in an unmanaged network |
-
2021
- 2021-09-09 CN CN202111056685.8A patent/CN113868194B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109150921A (en) * | 2018-11-05 | 2019-01-04 | 郑州云海信息技术有限公司 | A kind of login method of multi-node cluster, device, equipment and storage medium |
CN111181935A (en) * | 2019-12-19 | 2020-05-19 | 广东电网有限责任公司 | Method for batch adding and timed deleting domain users in AD domain security group |
Also Published As
Publication number | Publication date |
---|---|
CN113868194A (en) | 2021-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9292387B2 (en) | Medium, control method, and information processing apparatus | |
US20060015698A1 (en) | Method and apparatus for data backup | |
CN109582470B (en) | Data processing method and data processing device | |
CN113868194B (en) | Management method, device, system and medium for local user group of storage equipment | |
CN105893471B (en) | Data processing method and electronic equipment | |
CN104133703A (en) | Method and device for determining software not used frequently | |
US11853229B2 (en) | Method and apparatus for updating cached information, device, and medium | |
CN108647280A (en) | A kind of method and apparatus of memory communicating information | |
CN101510156A (en) | Information system resource recovery method and device | |
CN112463734A (en) | File retrieval method, system and related device | |
CN113688106B (en) | File monitoring method and device | |
CN113760830B (en) | Distributed file storage editable system and method | |
CN115993997A (en) | PostgreSQL database orphan transaction cleaning method | |
CN113687920B (en) | Object policy operation method, device and equipment of distributed system | |
CN105786650A (en) | Data management method and device | |
CN111045997B (en) | Centralized storage data deleting method and device | |
CN116820323A (en) | Data storage method, device, electronic equipment and computer readable storage medium | |
CN107656936B (en) | Terminal database construction method in field of instant messaging | |
CN115129733A (en) | Method, device and equipment for recording and inquiring bank data change history | |
CN114461762A (en) | Archive change identification method, device, equipment and storage medium | |
CN109408474B (en) | File creation method and client | |
CN110597828A (en) | Database changing method, device, equipment and storage medium | |
CN111124306A (en) | Data deleting method, system, equipment and computer readable storage medium | |
CN113467940B (en) | Resource management method, device, equipment and computer readable storage medium | |
CN115658626B (en) | Distributed network small file storage management method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |