Password loss processing method and device
By transmitting password-related information in the DHCP Offer message through the DHCP server, the problem of lost network device administrator account passwords is solved, enabling rapid recovery of device login and improving response speed and security.
Patent Information
- Application Number
- CN202511562422.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-01-13
AI Technical Summary
In computer networks, when network device administrator account passwords are lost, existing technologies are slow to respond, time-consuming, and carry the risk of configuration loss and human error, making it impossible to quickly restore device login.
The DHCP server receives a password loss request, obtains the password-related information, and sets it in the optional field of the DHCP Offer message. The target DHCP client then extracts and applies this information to quickly recover the account password.
It improved response speed, reduced processing time, avoided configuration loss and human error risks, and reduced the scope of equipment impact.
Smart Images

Figure CN121333720A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network technology, and in particular to a method and apparatus for handling lost passwords. Background Technology
[0002] In computer networks, there are a large number of network devices. These devices can be used in data center networks and campus networks to perform functions such as data forwarding, service access, and core service aggregation. Each network device has at least one administrator account and password, as well as multiple viewing permission accounts and passwords.
[0003] In routine maintenance, if a device malfunctions and requires in-depth troubleshooting, but the administrator's password is lost, forgotten, or unrecoverable due to human error, logging in to handle the problem becomes impossible. In some scenarios, contacting the manufacturer's after-sales service for password recovery is possible, but this carries risks such as slow response times, lengthy processing, and potential configuration loss. Alternatively, on-site personnel can reboot the device to enter the Bootware interface and bypass configuration, but this involves restarting the device, potentially expanding the scope of the problem and posing significant human error risks, presenting numerous drawbacks. Summary of the Invention
[0004] In view of the above problems, a method and apparatus for handling lost passwords are proposed to overcome or at least partially solve the above problems, comprising: A method for handling password loss, applied to a DHCP server, includes: Receive a password loss handling request for the target DHCP client; In response to the password loss handling request, the password-related information of the target DHCP client is obtained, and the password-related information is set in the optional field of the DHCP Offer message; The DHCP Offer message is sent to the target DHCP client; the target DHCP client is used to extract the password-related information from the optional field and apply it.
[0005] Optionally, setting the password-related information in the optional option field of the DHCP Offer message includes: The password-related information is encrypted, and the encrypted password-related information is set in the optional field of the DHCP Offer message; the target DHCP client is used to extract the encrypted password-related information from the optional field, and then apply it after decrypting the encrypted password-related information.
[0006] Optionally, the DHCP Offer message carries the physical address of the target DHCP client; the target DHCP client verifies the physical address carried in the DHCP Offer message, and after successful verification, extracts the encrypted password-related information from the optional field, and applies it after decrypting the encrypted password-related information.
[0007] Optionally, the target DHCP client is further configured to store the password-related information in the target DHCP client's configuration file.
[0008] Optionally, the optional field includes a first sub-option field and a second sub-option field, wherein the first sub-option field is used to record encryption algorithm information and the second sub-option field is used to record password-related information.
[0009] Optionally, the first sub-option field includes a type field, a length field, and a value field, wherein the value field is used to record encryption algorithm information. The second sub-option field includes a type field, a length field, and a value field. The value field is used to record password-related information.
[0010] Optionally, the optional field may also include a type field for the optional option and a length field for the optional option.
[0011] Optionally, the password-related information includes password information, or the password-related information includes both password information and account information.
[0012] Optionally, the DHCP server is a router, and the DHCP client is a switch.
[0013] A password loss handling device, applied to a DHCP server, comprising: The password loss handling request receiving module is used to receive password loss handling requests for the target DHCP client; The DHCP Offer message setting module is used to respond to the password loss handling request, obtain the password-related information of the target DHCP client, and set the password-related information in the optional option field of the DHCP Offer message; The DHCP Offer message sending module is used to send the DHCP Offer message to the target DHCP client; the target DHCP client is used to extract the password-related information from the optional field and apply it.
[0014] The embodiments of the present invention have the following advantages: In this embodiment of the invention, the DHCP server receives a password loss handling request for a target DHCP client, responds to the request by obtaining the password-related information of the target DHCP client, sets the password-related information in the optional field of a DHCP Offer message, and then sends the DHCP Offer message to the target DHCP client. The target DHCP client extracts the password-related information from the optional field and applies it. This enables the setting of the account password by sending an Offer message from the DHCP server when the account password of a network device is lost, thereby restoring device login. This improves response speed, reduces processing time, avoids risks such as configuration loss, and eliminates the need to restart the device, thus reducing the scope of impact and avoiding the risks of human error. Attached Figure Description
[0015] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of the steps of a method for handling password loss provided in some embodiments of the present invention; Figure 2 This is a schematic diagram of a system architecture provided in some embodiments of the present invention; Figure 3 This is a schematic diagram of a system architecture provided in some embodiments of the present invention; Figure 4 This is a flowchart of the steps of a method two for handling password loss provided in some embodiments of the present invention; Figure 5 This is a structural block diagram of a password loss processing device provided in some embodiments of the present invention. Detailed Implementation
[0017] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0018] In this invention, through the interaction between the DHCP server and the target DHCP client, the password can be quickly recovered and the device can be logged in when the network device account password is lost.
[0019] Specifically, when an administrator encounters a situation where they cannot log in to the device due to a forgotten account password or misconfiguration, they do not need to rely on the manufacturer's after-sales service or restart the device to enter boot mode. Instead, they can trigger an automated processing flow by sending a password loss processing request to the DHCP server.
[0020] In this process, the DHCP server first receives the request and verifies its legitimacy. It then retrieves the target client's password-related information from secure storage, including but not limited to the encrypted password, account information, and associated encryption algorithm identifier. To ensure transmission security, the password-related information is processed by a preset encryption algorithm, generating ciphertext which is then encapsulated in the optional fields of the DHCPOffer message. This field adopts a structured design, including a type field identifying the option function, a length field defining the data length, and a value field carrying the specific data. The encryption algorithm information and password information are placed in different sub-option fields, achieving data isolation and modular processing.
[0021] During message transmission, the DHCP server embeds the target client's physical address as a verification parameter into the message, ensuring that only legitimate devices can receive and process it. Upon receiving the message, the target DHCP client first verifies the physical address match. If the verification is successful, it extracts the encrypted data from the optional fields, decrypts it using the encryption algorithm information recorded in the first sub-option field, and recovers the original password. After successful decryption, the client writes the password information to its local configuration file, completing the account and password update and storage. Simultaneously, it triggers a login status refresh, allowing the administrator to immediately log in to the device using the new password.
[0022] The entire process is completed within the existing network architecture without interrupting business traffic or restarting equipment, significantly improving fault response efficiency and reducing the risk of human error and configuration loss. Furthermore, this solution supports flexible expansion; by adjusting the structure of optional fields and encryption algorithm types, it can adapt to password recovery needs of different security levels and device types, providing an efficient and reliable solution for the operation and maintenance management of data centers and campus networks.
[0023] Reference Figure 1The diagram illustrates a flowchart of a method for handling password loss provided by some embodiments of the present invention. This method can be applied to a DHCP (Dynamic Host Configuration Protocol) server. In DHCP, a client / server model is adopted, in which the DHCP server dynamically assigns network configuration parameters such as IP addresses to network devices (DHCP clients).
[0024] Among them, the DHCP server and DHCP client are network devices, which can be various devices used to build the Internet, such as switches, routers, network elements, etc.
[0025] In some examples, the DHCP server is a router, and the DHCP client is a switch. Both the switch and the router use DHCP functionality to dynamically allocate network device addresses.
[0026] Specifically, it may include the following steps: Step 101: Receive a password loss handling request for the target DHCP client.
[0027] When the account password of a network device is lost, if the DHCP function is enabled on the network device, the network device can act as a DHCP client to communicate with the DHCP server and send a password loss processing request to the DHCP server for the target DHCP client.
[0028] In some examples, the password loss handling request can be sent by the target DHCP client, or it can be provided by the user through third-party tools or by directly manipulating the DHCP server.
[0029] Step 102: In response to the password loss handling request, obtain the password-related information of the target DHCP client and set the password-related information in the optional field of the DHCP Offer message.
[0030] In some embodiments of the present invention, password-related information may include password information (Password), or password-related information may include password information and account information (Username).
[0031] In DHCP, there is an Offer message (the server responds with an Offer message, also known as an Offer message). The Offer message is a key step in the DHCP protocol interaction process, belonging to the second step of the four-step DHCP interaction process (discover, offer, request, confirm). It indicates that the server has received the client's request and is ready to assign an IP address to it. The Offer message contains network configuration parameters such as the assigned IP address, default gateway, and DNS server address.
[0032] In some examples, the data frame format of the Offer message in DHCP is shown in Table 1 below:
[0033] Table 1 The explanations for each field are as follows: op: The operation type of the message, divided into request messages and response messages. 1 is a request message; 2 is a response message. The specific message type is indicated in the options field.
[0034] htype and hlen: The hardware address type and length of the DHCP client.
[0035] hops: The number of DHCP relays through which the DHCP request message passes. This field increments by 1 each time the DHCP request message passes through a DHCP relay.
[0036] xid: A random number selected by the client when making a request, used to identify an address request process.
[0037] secs: The time elapsed since the DHCP client initiated the DHCP request. Currently unused and fixed at 0.
[0038] flags: The first bit is the broadcast response flag, used to indicate whether the DHCP server response message is sent via unicast or broadcast. 0 indicates unicast, and 1 indicates broadcast. The remaining bits are reserved.
[0039] ciaddr: The IP address of the DHCP client. If the client has a valid and available IP address, add it to this field; otherwise, set the field to 0. This field is not used for the client to request a specific IP address.
[0040] yiaddr: The IP address assigned to the client by the DHCP server.
[0041] siaddr: The server IP address from which DHCP clients obtain boot configuration information.
[0042] giaddr: The IP address of the first DHCP relay through which the DHCP client's request message passes.
[0043] chaddr: The hardware address of the DHCP client.
[0044] sname: The server name from which the DHCP client obtains startup configuration information.
[0045] file: The name and path of the startup configuration file specified by the DHCP server for DHCP clients.
[0046] options: Optional variable-length options field, containing configuration information such as message type, lease duration, DNS server IP address, and WINS server IP address.
[0047] As shown above, the DHCP Offer message has an optional field. The Option field in the DHCP message can be used to store control information and configuration parameters that are not defined in ordinary protocols, enabling dynamic address allocation while providing clients with richer network configuration information.
[0048] Based on this, embodiments of the present invention can utilize the optional fields in the DHCP Offer message to set the password-related information of the target DHCP client in the optional fields of the DHCP Offer message. Then, the password-related information can be transmitted to the target DHCP client through the DHCP Offer message, and the target DHCP client can obtain the password-related information by parsing the Offer message.
[0049] Step 103: Send the DHCP Offer message to the target DHCP client; the target DHCP client is used to extract the password-related information from the optional field and apply it.
[0050] After completing the password-related settings, the DHCP server can send a DHCP Offer message containing the password-related information to the target DHCP client according to the standard DHCP protocol procedure.
[0051] Upon receiving the Offer message, the target DHCP client can parse the message, identify the optional fields, accurately extract the password-related information from the optional fields, and then configure the password-related information on the network device where the target DHCP client is located, applying it to its own login authentication system and restoring normal access and management functions to the network device.
[0052] In this embodiment of the invention, after enabling the DHCP function on each network device, the ability to set network device account passwords (i.e., password-related information) through the DHCP server can be realized, solving the problem of being unable to log in to the device and unable to recover the original password in time due to forgotten or lost passwords or misconfiguration.
[0053] In some embodiments of the present invention, the target DHCP client is further configured to store the password-related information in the target DHCP client's configuration file.
[0054] In practical applications, the target DHCP client can also choose to store the received password-related information in its own configuration file, ensuring that the password-related information can still be used even after the device restarts.
[0055] In some embodiments of the present invention, setting the password-related information in the optional field of the DHCP Offer message includes: encrypting the password-related information and setting the encrypted password-related information in the optional field of the DHCP Offer message; the target DHCP client is used to extract the encrypted password-related information from the optional field and apply it after decrypting the encrypted password-related information.
[0056] In practical applications, to ensure the security of password-related information transmission, the password-related information can be encrypted and set in the optional fields of the DHCP Offer message. When receiving this Offer message, the target DHCP client can extract the encrypted password-related information from the optional fields, decrypt it, and obtain the password information.
[0057] In some examples, symmetric encryption algorithms such as AES (Advanced Encryption Standard) or asymmetric encryption algorithms such as RSA (Rivest-Shamir-Adleman Encryption Algorithm) can be used. After extracting the encrypted password information, the target DHCP client will decrypt it using the corresponding decryption algorithm. If AES symmetric encryption is used, the client needs to use the same key for decryption; if RSA asymmetric encryption is used, the corresponding private key is required.
[0058] In some embodiments of the present invention, the DHCP Offer message carries the physical address of the target DHCP client; the target DHCP client is used to verify the physical address carried in the DHCP Offer message, and after the verification is successful, extracts the encrypted password-related information from the optional field, and applies it after decrypting the encrypted password-related information.
[0059] In practical applications, to ensure that the DHCP Offer message is accurately delivered to the target DHCP client and to prevent unauthorized devices from obtaining password-related information, the DHCP Offer message will carry the physical address (Media Access Control Address, MAC) of the target DHCP client.
[0060] Upon receiving a DHCP Offer message, the target DHCP client can verify the physical address in the message to confirm that it was indeed sent to it. Only after successful verification will the target DHCP client extract the encrypted password information from the optional fields, decrypt it using a pre-agreed decryption algorithm, and finally obtain and apply the usable password information, effectively enhancing the security and accuracy of password-related information transmission.
[0061] In some embodiments of the present invention, the optional field includes a first sub-option field and a second sub-option field, wherein the first sub-option field is used to record encryption algorithm information and the second sub-option field is used to record password-related information.
[0062] In some embodiments of the present invention, the first sub-option field includes a type field of the first sub-option, a length field of the first sub-option, and a value field of the first sub-option, wherein the value field of the first sub-option is used to record encryption algorithm information.
[0063] In some embodiments of the present invention, the second sub-option field includes a type field, a length field, and a value field of the second sub-option, wherein the value field of the second sub-option is used to record password-related information.
[0064] In some embodiments of the present invention, the optional option field further includes a type field of the optional option and a length field of the optional option.
[0065] In some examples, the format of the Option option in the DHCP Offer message is shown in Table 2 below:
[0066] Table 2 The explanations for each field are as follows: Option type: This allows you to set the option's function type value. Option length: The length of the option varies depending on the option value. Value: This is the variable option's value. Different option types have different value formats.
[0067] In some examples, the DHCP Option options include: Option 3 (Router Option), Option 6 (DNS Server Option), Option 33 (Static Route Option), Option 60 (Vendor Identification Option), and Option 150 (TFTP Server Address Option) are available. Some options, such as Option 43, Option 82, and Option 184, are not uniformly defined in RFC 2132. These options are generally used for specific functions in specific scenarios, such as AP obtaining IP addresses across Layer 3, relay proxying, and voice information configuration. Furthermore, RFC 2132 and RFC 3679 also contain unassigned option numbers, such as 146-149, 151-174, and 178-207.
[0068] In this embodiment of the invention, a parameter design configuration function is provided for the option number that has not been assigned a value. A new option number that has not been assigned a value is designed. By adding sub-option1 and sub-option2, password-related information such as account password and configuration parameter values such as RSA or AES encryption algorithm are assigned to the DHCP client to decrypt the key and obtain the password-related information.
[0069] In some examples, the Option options provided in embodiments of the present invention are shown in Table 3 below:
[0070] Table 3 The explanations for each field are as follows: Option type (the type field for selectable options): Specifies the type of the option that represents this specific item. Use a hexadecimal number such as 0x20 to represent the username and password encryption configuration option.
[0071] Option length (the length field of the selectable option): The total length value of this Option.
[0072] Sub-option1 type (i.e., the type field of the first sub-option): The type of the sub-option, such as using a hexadecimal number like 0x40 to represent the encryption algorithm.
[0073] Sub-Option1 length (i.e., the length field of the first sub-option): Sub-option length, excluding the sub-option type and sub-option length fields.
[0074] Sub-option2 type (i.e., the type field of the second sub-option): The type of the sub-option, such as using a hexadecimal number like 0x80 to represent the username and password.
[0075] Sub-Option2 length (i.e., the length field of the second sub-option): Sub-option length, excluding the sub-option type and sub-option length fields.
[0076] Sub-option1 value (i.e., the value field of the first sub-option): The value of the sub-option. Sub-option1 represents the encryption algorithm. The value format is different for different types of sub-options.
[0077] Sub-option2 value (i.e., the value field of the second sub-option): The value of the sub-option. Sub-option2 represents Username / Password. The value format varies depending on the type of sub-option.
[0078] In some examples, the encryption algorithm, username, and password are of variable length, with each parameter separated by a space (hexadecimal 20). The value field's format is designed as shown in Table 4 below:
[0079] Table 4 In practical applications, by using DHCP Option to add specific option fields to send encrypted Username / Password Sub-option1 value and Sub-option2 value fields to network devices, the network devices can complete the configuration of username and password through DHCP Offer messages without the need for configuration distribution through dedicated network management equipment, thereby restoring normal access and management functions to the network devices.
[0080] In this embodiment of the invention, the DHCP server receives a password loss handling request for a target DHCP client, responds to the request by obtaining the password-related information of the target DHCP client, sets the password-related information in the optional field of a DHCP Offer message, and then sends the DHCP Offer message to the target DHCP client. The target DHCP client extracts the password-related information from the optional field and applies it. This enables the setting of the account password by sending an Offer message from the DHCP server when the account password of a network device is lost, thereby restoring device login. This improves response speed, reduces processing time, avoids risks such as configuration loss, and eliminates the need to restart the device, thus reducing the scope of impact and avoiding the risks of human error.
[0081] like Figure 2 The network consists of five routers and switches: A, B, C, D, and E. Router A acts as the DHCP server, while switches B, C, D, and E act as DHCP clients. Router A dynamically assigns IP addresses to switches B, C, D, and E. Users can log in to these five switches using their username and IP address. For example, an SSH connection can be initiated to switch C using `ssh admin@192.168.1.2`, followed by password verification. A similar connection can be initiated to switch D using `192.168.1.3`. However, if the username or password for switch C is lost or forgotten, users cannot log in immediately to locate and troubleshoot problems, increasing service disruption time and reducing problem-solving efficiency.
[0082] In this embodiment of the invention, by setting the username / password for a specified client using the DHCP Option field and RSA or AES encryption algorithms, a new account password can be reconfigured for the C device while ensuring network security during the password configuration process. Specifically, the username and password configuration information for a specified DHCP client are set using the DHCP Option variable option field, and the option field parameters are sent to the DHCP client via a DHCP Offer message.
[0083] When the DHCP Option adds a field that supports encrypted configuration of username and password, after specifying the MAC address of the corresponding DHCP client and the Username / Password configuration parameters on the DHCP server of device A, the encryption algorithm is carried through the DHCP Offer message and sent to the corresponding client for key decryption and configuration generation. This enables the function of issuing administrator account passwords to specified clients.
[0084] like Figure 3 Device A acts as a DHCP server, carrying the username and password of device C in the DHCP Option field. The username and password are encrypted using RSA or AES to ensure that even if the data packet is captured, the information cannot be easily deciphered. After receiving the DHCP Offer message from device A, device C uses the same RSA or AES key to decrypt the data packet, obtain the username and password information, and configure it. The new username and password can then take effect on device C, and the user can log in to device C using the newly issued configuration.
[0085] Reference Figure 4 The diagram illustrates a flowchart of another method for handling password loss provided by some embodiments of the present invention, applied to a DHCP server, and specifically includes the following steps: Step 401: Receive a password loss handling request for the target DHCP client.
[0086] Step 402: In response to the password loss handling request, obtain the password-related information of the target DHCP client.
[0087] Step 403: Encrypt the password-related information and set the encrypted password-related information in the optional fields of the DHCPOffer message.
[0088] Step 404: The DHCP Offer message is sent to the target DHCP client; the target DHCP client is used to extract the encrypted password-related information from the optional field and apply it after decrypting the encrypted password-related information.
[0089] In this embodiment of the invention, the DHCP server receives a password loss handling request for a target DHCP client, responds to the request by obtaining the password-related information of the target DHCP client, sets the password-related information in the optional field of a DHCP Offer message, and then sends the DHCP Offer message to the target DHCP client. The target DHCP client extracts the password-related information from the optional field and applies it. This enables the setting of the account password by sending an Offer message from the DHCP server when the account password of a network device is lost, thereby restoring device login. This improves response speed, reduces processing time, avoids risks such as configuration loss, and eliminates the need to restart the device, thus reducing the scope of impact and avoiding the risks of human error.
[0090] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0091] Reference Figure 5 The diagram illustrates a structural schematic of a password loss processing apparatus provided in some embodiments of the present invention, applied to a DHCP server, and specifically may include the following modules: Password loss handling request receiving module 501 is used to receive password loss handling requests for the target DHCP client; The DHCP Offer message setting module 502 is used to respond to the password loss processing request, obtain the password-related information of the target DHCP client, and set the password-related information in the optional option field of the DHCP Offer message; The DHCP Offer message sending module 503 is used to send the DHCP Offer message to the target DHCP client; the target DHCP client is used to extract the password-related information from the optional field and apply it.
[0092] Optionally, setting the password-related information in the optional option field of the DHCP Offer message includes: The password-related information is encrypted, and the encrypted password-related information is set in the optional field of the DHCP Offer message; the target DHCP client is used to extract the encrypted password-related information from the optional field, and then apply it after decrypting the encrypted password-related information.
[0093] Optionally, the DHCP Offer message carries the physical address of the target DHCP client; the target DHCP client verifies the physical address carried in the DHCP Offer message, and after successful verification, extracts the encrypted password-related information from the optional field, and applies it after decrypting the encrypted password-related information.
[0094] Optionally, the target DHCP client is further configured to store the password-related information in the target DHCP client's configuration file.
[0095] Optionally, the optional field includes a first sub-option field and a second sub-option field, wherein the first sub-option field is used to record encryption algorithm information and the second sub-option field is used to record password-related information.
[0096] Optionally, the first sub-option field includes a type field, a length field, and a value field, wherein the value field is used to record encryption algorithm information. The second sub-option field includes a type field, a length field, and a value field. The value field is used to record password-related information.
[0097] Optionally, the optional field may also include a type field for the optional option and a length field for the optional option.
[0098] Optionally, the password-related information includes password information, or the password-related information includes both password information and account information.
[0099] Optionally, the DHCP server is a router, and the DHCP client is a switch.
[0100] In this embodiment of the invention, the DHCP server receives a password loss handling request for a target DHCP client, responds to the request by obtaining the password-related information of the target DHCP client, sets the password-related information in the optional field of a DHCP Offer message, and then sends the DHCP Offer message to the target DHCP client. The target DHCP client extracts the password-related information from the optional field and applies it. This enables the setting of the account password by sending an Offer message from the DHCP server when the account password of a network device is lost, thereby restoring device login. This improves response speed, reduces processing time, avoids risks such as configuration loss, and eliminates the need to restart the device, thus reducing the scope of impact and avoiding the risks of human error.
[0101] Some embodiments of the present invention also provide an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method described above.
[0102] Some embodiments of the present invention also provide a computer-readable storage medium on which a computer program is stored, and which, when executed by a processor, implements the method described above.
[0103] Some embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the method described above.
[0104] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0105] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0106] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0107] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0111] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0112] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.
[0113] The above provides a detailed description of the method and apparatus for handling password loss. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method of password loss handling, the method comprising: Applied to a DHCP server, comprising: receiving a password loss processing request for a target DHCP client; in response to the password loss processing request, obtaining password-related information of the target DHCP client, and setting the password-related information in an optional option field of a DHCP Offer message; sending the DHCP Offer message to the target DHCP client; the target DHCP client is used to extract the password-related information from the optional option field and apply it.
2. The method of claim 1, wherein, The password-related information is set in the optional option field of the DHCP Offer message, comprising: encrypting the password-related information, and setting the encrypted password-related information in the optional option field of the DHCP Offer message; the target DHCP client is used to extract the encrypted password-related information from the optional option field, and apply it after decrypting the encrypted password-related information.
3. The method of claim 2, wherein, The DHCP Offer message carries the physical address of the target DHCP client; the target DHCP client is used to verify the physical address carried by the DHCP Offer message, and extract the encrypted password-related information from the optional option field after verification, and apply it after decrypting the encrypted password-related information.
4. The method of claim 1, wherein, The target DHCP client is also used to store the password-related information in a configuration file of the target DHCP client.
5. The method according to any one of claims 2 to 4, characterized in that, The optional option field includes a first sub-option field and a second sub-option field, the first sub-option field is used to record encryption algorithm information, and the second sub-option field is used to record password-related information.
6. The method of claim 5, wherein, The first sub-option field includes a type field of a first sub-option, a length field of the first sub-option, and a value field of the first sub-option, the value field of the first sub-option is used to record encryption algorithm information; The second sub-option field includes a type field of a second sub-option, a length field of the second sub-option, and a value field of the second sub-option, the value field of the second sub-option is used to record password-related information.
7. The method of claim 6, wherein, The optional option field further includes a type field of an optional option and a length field of the optional option.
8. The method of claim 1, wherein, The password-related information includes password information, or the password-related information includes password information and account information.
9. The method of claim 1, wherein, The DHCP server is a router, and the DHCP client is a switch.
10. An apparatus for password loss handling, the apparatus comprising: Applied to a DHCP server, comprising: a password loss processing request receiving module for receiving a password loss processing request for a target DHCP client; a DHCP Offer message setting module for obtaining password-related information of the target DHCP client in response to the password loss processing request, and setting the password-related information in an optional option field of a DHCP Offer message; The DHCP Offer message sending module is configured to send the DHCP Offer message to the target DHCP client; and the target DHCP client is configured to extract the password-related information from the optional option field and apply the password-related information.
Citation Information
Patent Citations
Router management password recovery method and system
CN105656907A
Network account password recovery method and device, client terminal device and server
CN105763520A
A switch password modification method and system
CN109714363A
Communication method and equipment
CN112995107A
Verification method based on DHCP protocol and related equipment
CN115694856A