A method, device, equipment and storage medium for restoring user authentication status
By acquiring and judging the user authentication status of the target server, determining the abnormal service and automatically restarting, the authentication interruption caused by network instability is solved, and the stability and processing efficiency of user authentication is improved.
Patent Information
- Application Number
- CN202311841629.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-12-28
AI Technical Summary
In large domains, authentication interruptions or authentication service errors caused by network instability affect user authentication progress.
By obtaining the user authentication status of the target server, determining whether it is abnormal, recording an exception log, determining the exception service based on the preset conditions, and restarting the exception service using the preset restart command until the authentication status is normal.
Reduce user authentication failure, avoid the impact of authentication progress, and improve exception handling efficiency and response speed.
Smart Images

Figure CN117792871B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for repairing user authentication status. Background Art
[0002] In a large domain, when there are multiple Linux hosts, the same account and password need to be set for each host. The NIS (Network Information Service) master control server can manage the accounts and passwords of all hosts in the domain. The internal network authentication method of the IC R&D industry is basically based on the NIS authentication method, which improves the security of the network and simplifies the management tasks.
[0003] In the prior art, centralized management of host accounts and user identity authentication are implemented through NIS, and the user's identity is verified when the user logs in. However, during the authentication process, network instability and other conditions may cause network service interruption, resulting in authentication interruption or authentication service errors, affecting the authentication progress. Summary of the invention
[0004] In view of this, the present invention provides a method, device, equipment and storage medium for repairing user authentication status to solve the problem in the prior art that authentication interruption caused by network conditions affects authentication progress.
[0005] In a first aspect, the present invention provides a method for repairing a user authentication status, the method comprising:
[0006] Obtain the user authentication status corresponding to the target server and determine whether the user authentication status is abnormal;
[0007] If the user authentication status is abnormal, an abnormal log is recorded, and the user authentication status is judged according to the abnormal log whether it meets the preset conditions, and the preset conditions are used to characterize the abnormal situation of the user authentication status;
[0008] If the user authentication status meets the preset conditions, the abnormal service is determined;
[0009] Restart the abnormal service using the preset restart command, and return to the step of determining whether the user authentication status is abnormal, until the user authentication status is no longer abnormal.
[0010] The present invention obtains the abnormal situation of the user authentication status of the target server to judge the user authentication status, and when the user authentication status is abnormal, judges whether the user authentication status meets the preset conditions, and promptly determines the abnormal service, restarts the abnormal service, and repairs the user authentication status, thereby reducing the situation of user authentication failure and avoiding the impact on the user authentication progress.
[0011] In an optional implementation, determining whether the user authentication status is abnormal includes:
[0012] Use the preset detection command to detect the user authentication status and obtain the detection result;
[0013] If the detection result is that the domain name and user information of the target server are received, it is determined that there is no abnormality in the user authentication status;
[0014] If the detection result is that the domain name of the target server is not set, it is determined that the user authentication status is abnormal.
[0015] The present invention detects the user authentication status through a preset detection command, and promptly determines whether the user authentication status is abnormal, thereby facilitating an administrator to handle the abnormal situation in a timely manner.
[0016] In an optional implementation, judging whether the user authentication status meets a preset condition according to the abnormal log includes:
[0017] If the user authentication status appears abnormal for a preset number of consecutive times in the abnormal log, it is determined that the user authentication status does not meet the preset conditions;
[0018] If the user authentication status is abnormal for a preset number of times that the abnormality does not appear continuously in the abnormality log, it is determined that the user authentication status meets the preset condition.
[0019] The present invention judges the abnormal user authentication status that appears continuously for a preset number of times in the abnormal log to determine the continuous situation of the abnormal user authentication status, thereby facilitating abnormal processing according to the user authentication status.
[0020] In an optional implementation, determining an abnormal service includes:
[0021] Determine whether the NIS service process on the target server is abnormal;
[0022] If the NIS service process on the target server is abnormal, the abnormal service is determined to be an NIS service abnormality;
[0023] If the NIS service process on the target server is normal, determine whether the communication between the target server and the NIS server is abnormal;
[0024] If the communication between the target server and the NIS server is abnormal, it is determined that the abnormal service is a network service abnormality.
[0025] The present invention determines the specific abnormal service by judging the abnormal situation of the NIS service process on the target server and the abnormal situation of the communication between the target server and the NIS server, so as to facilitate processing the abnormal situation according to the abnormal service and improve the efficiency of abnormal processing.
[0026] In an optional implementation, restarting the abnormal server using a preset restart command includes:
[0027] If the abnormal service is an NIS service abnormality, restart the NIS service using the first preset restart command;
[0028] If the abnormal service is a network service abnormality, the network service is restarted using the second preset restart command, and after the network service is restarted, the NIS service is restarted using the third preset restart command.
[0029] The present invention automatically repairs the user authentication status by restarting the NIS service or the network service, thereby eliminating the steps of the administrator manually confirming the abnormality and repairing it, and improving the efficiency of abnormality repair.
[0030] In an optional implementation, after determining whether the user authentication status meets a preset condition according to the abnormal log, the method further includes:
[0031] If the user authentication status in the abnormal log does not meet the preset condition, a first alarm message is generated and sent to the NIS server administrator.
[0032] The present invention generates alarm information to the NIS server so that the NIS server administrator can handle the abnormal situation and improve the response speed of the abnormal situation.
[0033] In an optional implementation, if the user authentication status satisfies a preset condition, after determining the abnormal service, the method further includes:
[0034] If the NIS service process on the target server is abnormal and the communication between the target server and the NIS server is abnormal, the host name of each target server is obtained;
[0035] Classify each target server according to the host name to obtain target servers of different types;
[0036] A second alarm message is generated according to the abnormal service, and the second alarm message is sent to administrators of target servers of various types.
[0037] The present invention uses flexible alarm notifications to remind target servers of various types of abnormalities, making it easier for server administrators to handle abnormal situations, improving the response speed to abnormal situations, and improving the efficiency of administrators in handling abnormal situations.
[0038] In a second aspect, the present invention provides a user authentication status repairing device, the device comprising:
[0039] The first judgment module is used to obtain the user authentication status corresponding to the target server and judge whether the user authentication status is abnormal;
[0040] The second judgment module is used to record an abnormality log if the user authentication status is abnormal, and judge whether the user authentication status meets a preset condition according to the abnormality log, wherein the preset condition is used to characterize the abnormality of the user authentication status;
[0041] A determination module, used to determine abnormal service if the user authentication status meets the preset conditions;
[0042] The restart module is used to restart the abnormal service using a preset restart command, and return to the step of determining whether the user authentication status is abnormal until the user authentication status is no longer abnormal.
[0043] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the user authentication status repair method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0044] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to cause a computer to execute the user authentication status repair method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 is a flow chart of a method for repairing user authentication status according to an embodiment of the present invention;
[0047] Figure 2 is an application schematic diagram of a method for repairing user authentication status according to an embodiment of the present invention;
[0048] Figure 3 is a structural block diagram of a user authentication status repairing device according to an embodiment of the present invention;
[0049] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0051] In the IC R&D industry, network authentication methods basically revolve around NIS authentication methods, ensuring that only authorized users can access specific resources. This helps improve network security while facilitating centralized management, simplifying management tasks, and improving efficiency.
[0052] However, unstable network conditions caused by network service interruptions and system problems caused by abnormal authentication services may lead to authentication interruptions or authentication service errors, thus affecting the user's work progress.
[0053] According to an embodiment of the present invention, an embodiment of a method for repairing a user authentication status is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0054] In this embodiment, a method for repairing user authentication status is provided, which is applied to a monitoring server A, wherein the monitoring server A is connected to a target server. Figure 1 is a flow chart of a method for repairing user authentication status according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0055] Step S101, obtaining the user authentication status corresponding to the target server, and determining whether the user authentication status is abnormal.
[0056] In the embodiment of the present invention, the monitoring server A polls all target servers to obtain the user authentication status corresponding to each target server, and determines in turn whether the user authentication status of the target server is abnormal. If the user authentication status is not abnormal, the process ends.
[0057] Step S102: if the user authentication status is abnormal, an abnormal log is recorded, and it is determined whether the user authentication status meets a preset condition according to the abnormal log.
[0058] In the embodiment of the present invention, the preset condition is used to characterize the abnormal situation of the user authentication status. If the user authentication status is abnormal, the abnormal log is recorded on the monitoring server A. According to the abnormal log, it is judged whether the user authentication status meets the preset condition, that is, whether there is a large number of user authentication status abnormalities, so as to facilitate the judgment of the specific node where the abnormality occurs.
[0059] Step S103: If the user authentication status meets the preset conditions, an abnormal service is determined.
[0060] In the embodiment of the present invention, if the user authentication status satisfies the preset condition, that is, there is no abnormality in the authentication status of a large number of users, a specific abnormal service is determined to process the abnormal service.
[0061] Step S104, restart the abnormal service using a preset restart command, and return to the step of determining whether the user authentication status is abnormal, until the user authentication status is no longer abnormal.
[0062] In the embodiment of the present invention, abnormal service includes the following two situations: abnormal NIS service process on the target server and abnormal communication between the target server and the NIS server. The abnormal service is restarted using a preset restart command to repair the abnormal user authentication state. After the repair, the process can return to step S101 to continue to determine whether the user state is abnormal, until the user authentication state is no longer abnormal, that is, the user authentication state is repaired.
[0063] The user authentication status repair method provided in this embodiment obtains the abnormal situation of the user authentication status of the target server to judge the user authentication status, and when the user authentication status is abnormal, it judges whether the user authentication status meets the preset conditions, and promptly determines the abnormal service and restarts the abnormal service to repair the user authentication status, thereby reducing the situation of user authentication failure and avoiding affecting the user authentication progress.
[0064] Specifically, in one embodiment, determining whether the user authentication status is abnormal in the above step S101 specifically includes the following steps:
[0065] Step S1011, using a preset detection command to detect the user authentication status and obtain the detection result.
[0066] Step S1012: If the detection result is that the domain name and user information of the target server are received, it is determined that there is no abnormality in the user authentication status.
[0067] Step S1013: If the detection result is that the domain name of the target server is not set, it is determined that the user authentication status is abnormal.
[0068] In the embodiment of the present invention, the NIS detection command yptest is used to detect the user authentication status. If the detection result is domainname domain name and user information, it is determined that the user authentication status is normal. If the detection result is ERROR: domainname is not set (domain name is not set), it is determined that the user authentication status is abnormal.
[0069] The user authentication status is detected through the preset detection command to promptly determine whether the user authentication status is abnormal, so that the administrator can handle the abnormal situation in time.
[0070] Specifically, in one embodiment, the above step S102 determines whether the user authentication status meets the preset condition according to the abnormal log, which specifically includes the following steps:
[0071] Step S1021: if the user authentication status appears abnormal for a preset number of consecutive times in the abnormality log, it is determined that the user authentication status does not meet the preset condition.
[0072] Step S1022: If the user authentication status is abnormal for a preset number of times that it does not appear continuously in the abnormal log, it is determined that the user authentication status meets the preset condition.
[0073] In the embodiment of the present invention, whether the user authentication status meets the preset condition is determined according to whether the user authentication status is abnormal for a preset number of consecutive times in the abnormality log. The preset number of times can be a number customized by the administrator. For example, if the user authentication status of five or ten consecutive target servers is abnormal during the same authentication process, the user authentication status that appears for the preset number of consecutive times is determined to be abnormal. The preset number of times can also be set according to the actual application scenario, which is not limited here.
[0074] The abnormal user authentication status that appears continuously for a preset number of times in the abnormal log is judged to determine the continuity of the abnormal user authentication status, so as to facilitate abnormal processing according to the user authentication status.
[0075] Specifically, in one embodiment, determining the abnormal service in the above step S103 specifically includes the following steps:
[0076] Step S1031, determining whether an abnormality occurs in the NIS service process on the target server.
[0077] Step S1032: If an abnormality occurs in the NIS service process on the target server, it is determined that the abnormal service is an NIS service abnormality.
[0078] Step S1033: If the NIS service process on the target server is not abnormal, it is determined whether the communication between the target server and the NIS server is abnormal.
[0079] Step S1034: If the communication between the target server and the NIS server is abnormal, it is determined that the abnormal service is a network service abnormality.
[0080] In the embodiment of the present invention, if the user authentication status meets the preset condition, that is, the preset number of user authentication statuses are not abnormal, then SSH (secure shell protocol) is used to remotely log in to the target server with abnormal status to determine whether the NIS service process is abnormal. Specifically, SSH is an encrypted network transmission protocol used to realize the connection between the monitoring server A and the target server.
[0081] Use the Linux command systemctl status plus the service name to confirm the service status. If the result returned is active, the NIS service process is abnormal, that is, the abnormal service is the NIS service abnormality. If it does not return active, the NIS service process is abnormal.
[0082] If the NIS service process on the target server is normal, then continue to determine whether the communication between the target server and the NIS server is abnormal. Specifically, use the ping command plus the NIS server address. If the return result is a data packet, it is determined that the communication between the target server and the NIS server is normal, that is, the abnormal service is a network service abnormality. If the return result is a request time out or other results, then the communication between the target server and the NIS server is abnormal.
[0083] By judging the abnormal situation of the NIS service process on the target server and the abnormal situation of the communication between the target server and the NIS server, the specific abnormal service is determined, so that the abnormal situation can be handled according to the abnormal service, thereby improving the efficiency of abnormal handling.
[0084] Specifically, in one embodiment, the above step S104 uses a preset restart command to restart the abnormal service, which specifically includes the following steps:
[0085] Step S1041: If the abnormal service is an abnormal NIS service, the NIS service is restarted using a first preset restart command.
[0086] Step S1042: If the abnormal service is a network service abnormality, the network service is restarted using the second preset restart command, and after the network service is restarted, the NIS service is restarted using the third preset restart command.
[0087] In the embodiment of the present invention, if the abnormal service is an NIS service abnormality, the script calls a system command to try to restart the NIS service. If the user authentication status returns to normal after the restart, the method flow ends.
[0088] If the abnormal service is a network service abnormality, the script first calls the system command to try to restart the network service, and then restarts the NIS service after the network service is restarted. If the user authentication status returns to normal after the restart, the method process ends.
[0089] Restart the NIS service or network service to automatically repair the user authentication status, eliminating the need for administrators to manually confirm and repair abnormalities, thereby improving the efficiency of abnormality repair.
[0090] Specifically, in one embodiment, the user authentication status repair method provided by the embodiment of the present invention further includes the following steps:
[0091] Step Sa: if the user authentication status in the abnormal log does not meet the preset condition, a first alarm message is generated and sent to the NIS server administrator.
[0092] In the embodiment of the present invention, after judging whether the user authentication status meets the preset condition according to the abnormal log, if the user authentication status in the abnormal log does not meet the preset condition, that is, a preset number of user authentication states appear to be abnormal continuously, a first alarm message is generated. The monitoring server A is connected to the monitoring platform, and the monitoring server A generates the first alarm message, sends the first alarm message to the monitoring platform, and sends the first alarm message to the administrator of the NIS server through the alarm function of the monitoring platform, so that the NIS server administrator can manually determine the server status in time.
[0093] By sending alarm information to the NIS server, the NIS server administrator can handle abnormal situations and improve the response speed of abnormal situations.
[0094] Specifically, in one embodiment, the user authentication status repair method provided by the embodiment of the present invention further includes the following steps:
[0095] Step Sb: if an exception occurs in the NIS service process on the target server and an exception occurs in the communication between the target server and the NIS server, the host name of each target server is obtained.
[0096] Step Sc, classifying each target server according to the host name to obtain target servers of various types.
[0097] Step Sd: Generate second alarm information according to the abnormal service, and send the second alarm information to administrators of target servers of various types.
[0098] In the embodiment of the present invention, after determining the abnormal service if the user authentication status meets the preset conditions, if the NIS service process on the target server is abnormal and the communication between the target server and the NIS server is abnormal, the user authentication status is still abnormal. The host name hostname of each target server is obtained to divide the target servers into three types: support servers, computing servers, and storage.
[0099] Specifically, the target server with the com and run keywords in the host name is the computing server, the target server with the st keyword in the host name is the storage server, and the target server without the com, run, and st keywords in the host name is the support server. This is only an example and is not intended to be limiting.
[0100] A second alarm message is generated based on the abnormal service, and the second alarm message is sent to the support server, computing server and storage respectively through the alarm function of the monitoring platform, so that the support server administrator can confirm the status of the server authentication end, the storage administrator can confirm the status of the storage authentication end, and the server administrator can confirm the status of the server authentication end.
[0101] Through flexible alarm notifications, abnormal reminders are given to target servers of various types, making it easier for server administrators to handle abnormal situations, improving the response speed to abnormal situations, and improving the efficiency of administrators in handling abnormal situations.
[0102] As a specific application example of the embodiment of the present invention, Figure 2 As shown, the user authentication status repair method is implemented by the following process: the monitoring server A is connected to the monitoring platform, and the user authentication status of all target servers is polled by the monitoring server A to determine whether the user authentication status of the target server is normal.
[0103] If the user authentication status of the target server is abnormal, it will be recorded in the log file of monitoring server A. If the user authentication status of more than 5 servers is abnormal in a polling detection, an alarm will be sent through the monitoring platform to notify the NIS server administrator to confirm the server status.
[0104] If there is no abnormality in the authentication status of large-volume server users, determine whether the NIS service process on the target server is normal. If the NIS service process on the target server is abnormal, restart the NIS service. If the NIS service process on the target server is normal, determine whether the communication between the target server and the NIS server is normal. If the communication between the target server and the NIS server is abnormal, restart the network service and restart the NIS service.
[0105] If the communication between the target server and the NIS server is normal, the target server is divided into three types: support server, computing server and storage according to the target server host name. An alarm notification is sent to the support server administrator through the monitoring platform to confirm the status of the server authentication end, an alarm notification is sent to the support storage administrator to confirm the status of the storage authentication end, and an alarm notification is sent to the computing server administrator to confirm the status of the server authentication end.
[0106] In this embodiment, a user authentication status repair device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0107] This embodiment provides a user authentication status repair device, such as Figure 3 As shown, including:
[0108] The first judgment module 301 is used to obtain the user authentication status corresponding to the target server and judge whether the user authentication status is abnormal.
[0109] The second judgment module 302 is used to record an abnormality log if the user authentication status is abnormal, and judge whether the user authentication status meets the preset conditions according to the abnormality log.
[0110] The determination module 303 is used to determine abnormal service if the user authentication status meets the preset conditions.
[0111] The restart module 304 is used to restart the abnormal service using a preset restart command, and return to the step of determining whether the user authentication status is abnormal, until the user authentication status is no longer abnormal.
[0112] In some optional implementations, the first determination module 301 includes:
[0113] The acquisition unit is used to detect the user authentication status using a preset detection command and obtain the detection result.
[0114] The first determining unit is used to determine that there is no abnormality in the user authentication state if the detection result is that the domain name and user information of the target server are received.
[0115] The second determining unit is configured to determine that an abnormality occurs in the user authentication state if the detection result shows that the domain name of the target server is not set.
[0116] In some optional implementations, the second determination module 302 includes:
[0117] The third determining unit is configured to determine that the user authentication status does not meet a preset condition if the user authentication status is abnormal for a preset number of consecutive times in the abnormality log.
[0118] The fourth determining unit is configured to determine that the user authentication status satisfies a preset condition if the user authentication status is abnormal for a preset number of times that does not appear consecutively in the abnormal log.
[0119] In some optional implementations, the determining module 303 includes:
[0120] The first judging unit is used to judge whether an abnormality occurs in the NIS service process on the target server.
[0121] The fifth determining unit is configured to determine that the abnormal service is an NIS service abnormality if an abnormality occurs in the NIS service process on the target server.
[0122] The second judgment unit is used to judge whether the communication between the target server and the NIS server is abnormal if the NIS service process on the target server is not abnormal.
[0123] The sixth determining unit is configured to determine that the abnormal service is a network service abnormality if there is no abnormality in the communication between the target server and the NIS server.
[0124] In some optional implementations, the restart module 304 includes:
[0125] The first restart unit is used to restart the NIS service by using a first preset restart command if the abnormal service is an abnormal NIS service.
[0126] The second restart unit is used to restart the network service using a second preset restart command if the abnormal service is a network service abnormality, and restart the NIS service using a third preset restart command after the network service is restarted.
[0127] In some optional embodiments, the device further comprises:
[0128] The first sending module is used to generate a first alarm message if the user authentication status in the abnormal log does not meet a preset condition, and send the first alarm message to the NIS server.
[0129] In some optional embodiments, the device further comprises:
[0130] The acquisition module is used to acquire the host name of each target server if an abnormality occurs in the NIS service process on the target server and an abnormality occurs in the communication between the target server and the NIS server.
[0131] The classification module is used to classify each target server according to the host name to obtain target servers of various types.
[0132] The second sending module is used to generate second alarm information according to the abnormal service and send the second alarm information to target servers of various types.
[0133] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0134] The user authentication status repair device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0135] The embodiment of the present invention also provides a computer device having the above Figure 3 The user authentication status repair device shown.
[0136] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0137] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0138] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0139] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0140] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0141] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0142] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the computer device, such as a touch screen, etc. The output device 40 can include a display device, etc.
[0143] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0144] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for repairing user authentication status, characterized in that: The method comprises: Obtain the user authentication status corresponding to the target server and determine whether the user authentication status is abnormal; If the user authentication status is abnormal, an abnormal log is recorded, and according to the abnormal log, it is determined whether the user authentication status meets the preset condition, and the preset condition is used to characterize the abnormal situation of the user authentication status; If the user authentication status meets the preset conditions, the abnormal service is determined; Restart the abnormal service using the preset restart command, and return to the step of determining whether the user authentication status is abnormal, until the user authentication status is no longer abnormal; The abnormality determination service includes: Use SSH to remotely log in to the target server with abnormal status to determine whether the NIS service process on the target server is abnormal; If the NIS service process on the target server is abnormal, the abnormal service is determined to be an NIS service abnormality; If the NIS service process on the target server is normal, use the ping command plus the NIS server address to determine whether the communication between the target server and the NIS server is abnormal; If the communication between the target server and the NIS server is abnormal, the abnormal service is determined to be a network service abnormality.
2. The method according to claim 1, characterized in that The determining whether the user authentication status is abnormal includes: Use the preset detection command to detect the user authentication status and obtain the detection result; If the detection result is that the domain name and user information of the target server are received, it is determined that there is no abnormality in the user authentication status; If the detection result is that the domain name of the target server is not set, it is determined that the user authentication status is abnormal.
3. The method according to claim 1, characterized in that The determining whether the user authentication status meets a preset condition according to the abnormal log includes: If the user authentication status appears abnormal for a preset number of consecutive times in the abnormal log, it is determined that the user authentication status does not meet the preset condition; If the user authentication status is abnormal for a preset number of times that does not appear continuously in the abnormal log, it is determined that the user authentication status meets the preset condition.
4. The method according to claim 1, characterized in that: The method of restarting the abnormal server by using a preset restart command includes: If the abnormal service is an NIS service abnormality, restart the NIS service using the first preset restart command; If the abnormal service is a network service abnormality, the network service is restarted using the second preset restart command, and after the network service is restarted, the NIS service is restarted using the third preset restart command.
5. The method according to claim 1, characterized in that After determining whether the user authentication status meets a preset condition according to the abnormal log, the method further includes: If the user authentication status in the abnormal log does not meet the preset condition, a first alarm message is generated and sent to the NIS server administrator.
6. The method according to claim 1, characterized in that If the user authentication status meets the preset condition, after determining the abnormal service, the method further includes: If the NIS service process on the target server is abnormal and the communication between the target server and the NIS server is abnormal, the host name of each target server is obtained; Classifying each target server according to the host name to obtain target servers of various types; A second alarm message is generated according to the abnormal service, and the second alarm message is sent to administrators of target servers of various types.
7. A user authentication status repair device, characterized in that: The device comprises: The first judgment module is used to obtain the user authentication status corresponding to the target server and judge whether the user authentication status is abnormal; A second judgment module is used to record an abnormality log if the user authentication status is abnormal, and judge whether the user authentication status meets a preset condition according to the abnormality log, wherein the preset condition is used to characterize the abnormality of the user authentication status; A determination module, used to determine abnormal service if the user authentication status meets the preset conditions; A restart module is used to restart the abnormal service using a preset restart command, and return to the step of determining whether the user authentication status is abnormal, until the user authentication status is no longer abnormal; Among them, the determination module is specifically used for: using SSH to remotely log in to the target server with abnormal status, and determining whether the NIS service process on the target server is abnormal; if the NIS service process on the target server is abnormal, determining that the abnormal service is the NIS service abnormality; if the NIS service process on the target server is not abnormal, using the ping command plus the NIS server address to determine whether the communication between the target server and the NIS server is abnormal; if the communication between the target server and the NIS server is abnormal, determining that the abnormal service is the network service abnormality.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the user authentication status repair method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the user authentication status repairing method according to any one of claims 1 to 6.