A method, system, device and storage medium for disabling remote login of a root account

By modifying the remote login configuration of the root account and the permissions of the ICFS account, remote login by the root account was disabled, thus resolving the security risks associated with remote login by the root account and improving the security of the storage node server.

CN116226882BActive Publication Date: 2026-04-07JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, remote login using the root account on Linux systems poses security risks and can easily lead to server attacks due to data leaks, thus failing to meet the need to improve server security.

Method used

To prevent remote login from the root account, modify the remote login configuration file of the root account, change the UID and GID of the icfs account to those of a regular account, copy and adapt the environment files of the root account to the icfs account directory, configure the icfs account to allow the use of process management commands, and restart the sshd service to ensure that the icfs account can perform tasks normally.

Benefits of technology

Disabling root SSH remote login ensures that the storage node server has only one superuser privilege, improving server security and meeting the customer's security baseline requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226882B_ABST
    Figure CN116226882B_ABST
Patent Text Reader

Abstract

The application provides a method, system, device and storage medium for disabling remote login of a root account, the method comprising: modifying a remote login configuration file of the root account to reject remote login of the root account; modifying UID and GID of an icfs account to modify the authority of the icfs account to a normal account, and modifying a login file of the icfs account to allow remote login of the icfs account; copying an environment file under a root account directory to an icfs account directory, and modifying the environment file to adapt to the icfs account; and setting the icfs account to allow use of a process management command and restart an sshd service. The application realizes disabling ssh remote login of a root account of a storage server node, and simultaneously realizes ssh remote login of an icfs account of a storage system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of distributed storage systems, and more particularly, to a method, system, device and storage medium for disabling remote login of a root account. BACKGROUND

[0002] In a Linux system, a root account has almost all permissions and is a super account on the operating system. This account can access all commands and files on the system and has full read, write and execute permissions. It is used to perform any type of task on the system; create / update / access / delete accounts of other users, install / remove / upgrade software packages. The root user has absolute power and any operation performed is critical to the system. This account can also be misused due to accidents, malice or human disregard for rules, causing major accidents. Once the root account information is leaked, it will be a fatal threat to the server. Therefore, disabling remote login of the root account through ssh can greatly improve the security of the server, even if the root account password is leaked. Disabling remote login of the root ssh can also effectively prevent server attacks. Based on the need of customers to improve server security, a security scan found that the storage node could not disable remote login of the root ssh. SUMMARY

[0003] Therefore, the embodiments of the present application aim to provide a method, system, computer device and computer readable storage medium for disabling remote login of a root account. The present application disables remote login of the root ssh, ensures that the storage node server has only one super user permission, changes the icfs account permission to a normal user permission, and ensures that the icfs account can normally perform tasks when logging into the storage server node, thereby improving the security of the server and meeting the customer's security baseline requirements.

[0004] To achieve the above purpose, one aspect of the embodiments of the present application provides a method for disabling remote login of a root account, comprising the following steps: modifying a remote login configuration file of the root account to refuse remote login of the root account; modifying a UID and a GID of an icfs account to change the permission of the icfs account to a normal account, and modifying a login file of the icfs account to allow remote login of the icfs account; copying an environment file under a root account directory to an icfs account directory, and modifying the environment file to adapt to the icfs account; and setting the icfs account to allow the use of process management commands and restarting an sshd service.

[0005] In some embodiments, the method further comprises copying a remote login file under the root account directory to the icfs account directory, and modifying the owner of the remote login file to the icfs account.

[0006] In some embodiments, the method further comprises modifying a limit file under the icfs account to remove a limit on the number of processes running using the icfs account on the storage server node.

[0007] In some embodiments, the method further comprises copying a run file under the root account directory to the icfs account directory, and adding the account name of the icfs account to the run file in the icfs account directory.

[0008] In another aspect of the embodiments of the present application, a system for disabling remote login of a root account is provided, comprising: a first modification module configured to modify a remote login configuration file of the root account to reject remote login of the root account; a second modification module configured to modify UID and GID of an icfs account to modify the permissions of the icfs account to be normal account, and modify a login file of the icfs account to allow remote login of the icfs account; a copying module configured to copy an environment file under a root account directory to an icfs account directory, and modify the environment file to adapt to the icfs account; and a setting module configured to set the icfs account to allow use of process management commands and restart an sshd service.

[0009] In some embodiments, the system further comprises a second copying module configured to copy a remote login file under the root account directory to the icfs account directory, and modify the owner of the remote login file to the icfs account.

[0010] In some embodiments, the system further comprises a third modification module configured to modify a limit file under the icfs account to remove a limit on the number of processes running using the icfs account on the storage server node.

[0011] In some embodiments, the system further comprises a third copying module configured to copy a run file under the root account directory to the icfs account directory, and add the account name of the icfs account to the run file in the icfs account directory.

[0012] In yet another aspect of the embodiments of the present application, a computer device is provided, comprising: at least one processor; and a memory storing computer instructions executable on the processor, the instructions, when executed by the processor, implement the steps of the above method.

[0013] Still further, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the method steps described above.

[0014] The present application has the following beneficial technical effects: the root ssh remote login is disabled, only one super user permission is ensured for the storage node server, the icfs account permission is changed to a normal user permission, and the icfs account login storage server node can normally execute tasks, so that the server security of the storage node is improved, and the customer security baseline requirement is met. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only some embodiments of the present application, and for those skilled in the art, other embodiments can be obtained without creative labor on the basis of these drawings.

[0016] Figure 1 The schematic diagram of the embodiment of the method for disabling root account remote login provided by the present application;

[0017] Figure 2 The flow chart of the embodiment of the method for disabling root account remote login provided by the present application;

[0018] Figure 3 The schematic diagram of the embodiment of the system for disabling root account remote login provided by the present application;

[0019] Figure 4 The hardware structure schematic diagram of the embodiment of the computer device for disabling root account remote login provided by the present application;

[0020] Figure 5 The schematic diagram of the embodiment of the computer storage medium for disabling root account remote login provided by the present application. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of the present application more clear, the following will further describe the embodiments of the present application in combination with specific embodiments and with reference to the drawings.

[0022] It should be noted that all the expressions of "first" and "second" in the embodiments of the present application are used to distinguish two same name different entities or different parameters, and it can be seen that "first" and "second" are only for the convenience of description, and should not be understood as a limitation of the embodiments of the present application. The subsequent embodiments will not be described one by one.

[0023] In a first aspect, an embodiment of a method for disabling remote login of a root account is provided. Figure 1 An embodiment of the method for disabling remote login of a root account is shown. As shown in the figure, the embodiment of the method comprises the following steps: Figure 1 As shown in the figure, the embodiment of the method comprises the following steps:

[0024] S1, modifying a remote login configuration file of the root account to reject remote login of the root account;

[0025] S2, modifying UID and GID of the icfs account to modify the authority of the icfs account to a normal account, and modifying a login file of the icfs account to allow remote login of the icfs account;

[0026] S3, copying an environment file under a root account directory to an icfs account directory, and modifying the environment file to adapt to the icfs account; and

[0027] S4, setting the icfs account to allow use of a process management command and restarting an sshd service.

[0028] The root account is a super account on a Linux operating system, and the icfs account is a running account of a storage system. A current storage server node uses the root account to perform ssh remote login, and uses the icfs account to run the storage system. The UID of the icfs account is 0, and the authority is the same as that of the root. In order to meet the needs of customers to improve the security of the storage server node, the root ssh remote login is disabled, and at the same time, it is necessary to change the authority of the icfs account to a normal user authority, and to ensure that the icfs account can normally perform tasks after logging into the storage server node.

[0029] Ssh (remote connection tool) connection principle: ssh service is a daemon, the system background listens to the connection of the client, the process name of the ssh server is sshd, which is responsible for real-time listening to the request of the client, including public key exchange and other information. When the server starts, it generates a key (such as 768-bit public key) itself, the local ssh client sends a connection request to the ssh server, the server checks the data and IP address sent by the client at the connection point, and sends the key (768 bits) to the client after confirming the legality, at this time the client combines the local private key (256 bits) and the public key (768 bits) of the server into a key pair key (1024 bits), and sends it back to the server side, establishes a connection through key-pair data transmission. The ssh server is composed of two parts: openssh (provides ssh service) and openssl (provides encryption program). The ssh client can use XSHELL, Securecrt and Mobaxterm tools to connect.

[0030] The embodiment of the application disables root ssh remote login, ensures that the storage node server has only one superuser permission, changes the icfs account permission to a normal user permission, and ensures that the icfs account login storage server node can normally execute tasks, so that the storage node improves the server security and meets the customer security baseline requirements.

[0031] First, modify the remote login configuration file of the root account to reject remote login of the root account. To disable root ssh remote login, modify the / etc / ssh / sshd_config file to change PermitRootLogin yes to PermitRootLogin no. After modification, restart the sshd service to take effect. After taking effect, the root account ssh remote login is rejected. If PermitRootLogin is not set, the default is yes, that is, the root account can log in. If set to without-password, the root account can log in, but password ssh login is not allowed. If set to no, the root account is not allowed to log in. If set to forced-commands-only, the root account can log in, but after logging in, it cannot enter the interaction, but automatically exits after executing the specified command.

[0032] UID and GID of the icfs account are modified to modify the permission of the icfs account to a normal account, and a login file of the icfs account is modified to allow remote login of the icfs account. UID and GID of the icfs account are modified, UID and GID of the icfs account in / etc / passwd are changed to 167, so that the icfs user is a normal account, and the permission of the icfs user is reduced. The information of the icfs account in / etc / passwd is changed from / sbin / nologin to / bin / bash, so that the icfs account can successfully perform ssh remote login.

[0033] In the embodiment of the application, a password is set for the icfs account for ssh remote login of the icfs account. The icfs account password can be modified by using the command echo 12345 | passwd --stdin icfs. In the embodiment of the application, 12345 in the command is only an example of the password, and can be adjusted according to specific needs.

[0034] In some embodiments, the method of the embodiment of the application further comprises copying a remote login file under a root account directory to an icfs account directory, and modifying the owner of the remote login file to the icfs account. The embodiment of the application needs to realize ssh remote login without password for the icfs account between storage service nodes, and needs to ensure that the contents of the.ssh folder under the home directory of the icfs account are the same. The.ssh folder under the home directory of the root account can be copied to the home directory of the icfs account, and the owner of the.ssh folder under the home directory of the icfs account is modified to the icfs account.

[0035] In some embodiments, the method of the embodiment of the application further comprises modifying a limit file under the icfs account to remove the limit on the number of processes running on the storage server node using the icfs account. The embodiment of the application needs to ensure that the number of processes under the icfs account is not limited. The / etc / security / limits.d / 20-nproc.conf file can be modified to add the icfs soft nproc unlimited command, so as to ensure that the number of processes running on the storage server node using the icfs account has no upper limit, and prevent the problem of program unable to run.

[0036] In some embodiments, the method of the present embodiment further comprises: copying a running file under the root account directory to the icfs account directory, and adding the icfs account name to the running file in the icfs account directory. The icfs account ssh remote login needs to display the account name, and export PS1='[\u@\h\W]\\$' is added to the.bash_profile file under the icfs account home directory. If there is no.bash_profile file, a copy can be copied from the root account home directory. The permission owner of the.bash_profile file is modified to the icfs account, and the.bash_profile file is activated by source.bash_profile.

[0037] In the present embodiment, the environment file under the root account directory is copied to the icfs account directory, and the environment file is modified to adapt to the icfs account. The present embodiment needs to ensure that the icfs user logs in with the bin sbin environment variable. The.bashrc file under the root account home directory is copied to the icfs account home directory, and the owner of the.bashrc file is modified to the icfs account. After the icfs account ssh remote login is used, the storage server node environment variable has the command in bin sbin, and the icfs account does not affect the execution of the task.

[0038] In the present embodiment, the icfs account is set to allow the use of process management commands and restart the sshd service. The sshd service is restarted by the systemctl restart sshd command, which realizes the disablement of the root account remote login, and the icfs account login storage server node can normally execute the task.

[0039] The embodiment of the application allows the icfs account to use the systemctl command, modifies two files of / usr / share / polkit-1 / actions / org.freedesktop.systemd1.policy and / usr / share / polkit-1 / actions / org.freedesktop.policykit.policy, changes all the authorizations in the defaults corresponding to manage-units to yes, and then restarts polkit by executing systemctl restart polkit. The systemctl command mainly has two functions: controlling the systemd system and managing the services running on the system. The commonly used commands of systemctl are as follows: 1. starting a service. systemctl start servicename; 2. stopping a service. systemctl stop servicename; 3. restarting a service. systemctl restart servicename; 4. checking whether the service has been started. systemctl is-active servicename; 5. checking the status of the service. systemctl status servicename; 6. enabling the service to start automatically at boot. systemctl enable servicename; 7. disabling the service from starting automatically at boot. systemctl disable servicename; 8. checking whether the service is enabled to start automatically at boot. systemctl is-enabled servicename; 9. only restarting the service that is running. systemctl try-restart servicename; 10. displaying all service states - space page q exit. systemctl list-units --type service --all; 11. checking the list of services that have been started successfully. systemctl list-unit-files | grep enabled; 12. checking the list of services that have failed to start. systemctl --failed; 13. checking the status of all services - space page q exit. systemctl list-unit-files --type service.

[0040] Figure 2 The flowchart of the embodiment of the method for disabling remote login of the root account provided by the application is as follows, Figure 2As shown, the / etc / ssh / sshd_config file is modified, PermitRootLogin yes is changed to PermitRootLogin no, the icfs account UID and GID are modified, the icfs account UID and GID in the / etc / passwd file are changed to 167, a password is set for the icfs user, which is used for the icfs account ssh remote login. The icfs account ssh remote login is allowed, the information of the icfs account in the / etc / passwd file is changed from / sbin / nologin to / bin / bash, the icfs account ssh remote login is realized between the storage service nodes without password, the icfs account ssh login needs to display the account name, the export PS1='[\u@\h\W]\$' is added to the.bash_profile file in the home directory of the icfs account, the environment variable of the icfs user is ensured to be logged in, the icfs account is allowed to use the systemctl command, the sshd service is restarted, the systemctl restart sshd is realized, the root account remote login is prohibited, and the icfs account login storage server node can normally execute tasks.

[0041] The current storage server node uses the root account ssh remote login, the storage system is run by using the icfs account, the icfs account uid is 0, and the permission is the same as that of the root. In order to meet the needs of customers to improve the security of the storage server node, the root ssh remote login is disabled, the storage node server has only one super user permission, the icfs account permission needs to be changed to a normal user permission, and the icfs account login storage server node can normally execute tasks.

[0042] The embodiment of the application disables the root ssh remote login, ensures that the storage node server has only one super user permission, changes the icfs account permission to a normal user permission, and ensures that the icfs account login storage server node can normally execute tasks, so that the storage node improves the server security and meets the customer security baseline requirements.

[0043] It should be particularly pointed out that each step in each embodiment of the above-mentioned method for disabling the root account remote login can be crossed, replaced, added, deleted and reduced, therefore, these reasonable permutations and combinations of the method for disabling the root account remote login should also belong to the protection scope of the application, and the protection scope of the application should not be limited to the embodiments.

[0044] Based on the above purpose, a second aspect of the embodiment of the application provides a system for disabling the root account remote login. Figure 3As shown, the system 200 comprises a first modification module configured to modify a root account remote login configuration file to reject root account remote login, a second modification module configured to modify UID and GID of an icfs account to modify the permission of the icfs account to a normal account, and modify a login file of the icfs account to allow remote login of the icfs account, a copying module configured to copy an environment file under a root account directory to an icfs account directory, and modify the environment file to adapt to the icfs account, and a setting module configured to set the icfs account to allow use of a process management command and restart an sshd service.

[0045] In some embodiments, the system further comprises a second copying module configured to copy a remote login file under a root account directory to an icfs account directory, and modify the owner of the remote login file to the icfs account.

[0046] In some embodiments, the system further comprises a third modification module configured to modify a limit file under the icfs account to remove the limit on the number of processes running on the storage server node using the icfs account.

[0047] In some embodiments, the system further comprises a third copying module configured to copy a run file under a root account directory to an icfs account directory, and add the account name of the icfs account to the run file in the icfs account directory.

[0048] The embodiment of the present application disables root ssh remote login, ensures that the storage node server has only one superuser permission, changes the icfs account permission to a normal user permission, and ensures that the icfs account can normally perform tasks when logging into the storage server node, thereby improving the server security of the storage node and meeting the customer security baseline requirement.

[0049] To achieve the above object, a third aspect of the embodiment of the present application provides a computer device, comprising at least one processor, and a memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the following steps: S1, modifying a root account remote login configuration file to reject root account remote login; S2, modifying UID and GID of an icfs account to modify the permission of the icfs account to a normal account, and modifying a login file of the icfs account to allow remote login of the icfs account; S3, copying an environment file under a root account directory to an icfs account directory, and modifying the environment file to adapt to the icfs account; and S4, setting the icfs account to allow use of a process management command and restart an sshd service.

[0050] In some embodiments, the method further comprises copying a remote login file under the root account directory to the icfs account directory, and modifying the owner of the remote login file to the icfs account.

[0051] In some embodiments, the method further comprises modifying a limit file under the icfs account to remove a limit on the number of processes running on the storage server node using the icfs account.

[0052] In some embodiments, the method further comprises copying a run file under the root account directory to the icfs account directory, and adding the account name of the icfs account to the run file in the icfs account directory.

[0053] The embodiments of the present application disable root ssh remote login, ensure that the storage node server has only one superuser permission, change the icfs account permission to a normal user permission, and ensure that the icfs account login storage server node can normally perform tasks, so that the storage node improves server security and meets customer security baseline requirements.

[0054] As shown in Figure 4 , it is a hardware structure schematic diagram of one embodiment of the computer device provided by the present application for disabling root account remote login.

[0055] As shown in Figure 4 , the device includes a processor 301 and a memory 302.

[0056] The processor 301 and the memory 302 can be connected through a bus or other means, Figure 4 for example, through a bus connection.

[0057] The memory 302 is a non-volatile computer readable storage medium, which can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method for disabling root account remote login in the embodiments of the present application. The processor 301 executes various function applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 302, that is, implements the method for disabling root account remote login.

[0058] The memory 302 can include a program storage area and a data storage area. The program storage area can store an operating system, applications required for at least one function, and the like. The data storage area can store data created according to use of the method of disabling remote login of a root account, and the like. In addition, the memory 302 can include a high-speed random access memory, and can also include a nonvolatile memory such as at least one of a magnetic disk storage device, a flash memory device, or other nonvolatile solid state memory device. In some embodiments, the memory 302 can optionally include a memory disposed remotely with respect to the processor 301, which can be connected to the local module through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0059] One or more computer instructions 303 corresponding to the method of disabling remote login of a root account are stored in the memory 302, and when executed by the processor 301, perform the method of disabling remote login of a root account in any of the method embodiments described above.

[0060] The method of disabling remote login of a root account includes the steps of: modifying a remote login configuration file of a root account to reject remote login of the root account; modifying a UID and a GID of an icfs account to modify a permission of the icfs account to a normal account, and modifying a login file of the icfs account to allow remote login of the icfs account; copying an environment file under a root account directory to an icfs account directory, and modifying the environment file to adapt to the icfs account; and setting the icfs account to allow use of a process management command and to restart an sshd service.

[0061] In some embodiments, the method further includes copying a remote login file under a root account directory to an icfs account directory, and modifying an owner of the remote login file to the icfs account.

[0062] In some embodiments, the method further includes modifying a limit file under the icfs account to remove a limit on a number of processes run using the icfs account on a storage server node.

[0063] In some embodiments, the method further includes copying a run file under a root account directory to an icfs account directory, and adding an account name of the icfs account to the run file in the icfs account directory.

[0064] The embodiment of the present application disables remote login of the root ssh, ensures that the storage node server has only one superuser permission, changes the icfs account permission to a normal user permission, and ensures that the icfs account can normally perform tasks after logging in the storage server node, thereby improving the server security of the storage node and meeting the customer security baseline requirement.

[0065] Any one of the embodiments of the computer device for executing the method for disabling remote login of the root account can achieve the same or similar effects as any one of the foregoing method embodiments.

[0066] The present application also provides a computer readable storage medium storing a computer program for executing the method for disabling remote login of the root account when executed by a processor.

[0067] As shown in Figure 5 , it is a schematic diagram of one embodiment of the computer storage medium for disabling remote login of the root account provided by the present application. As shown in Figure 5 , the computer storage medium is taken as an example. The computer readable storage medium 401 stores a computer program 402 for executing the foregoing method when executed by a processor.

[0068] The method for disabling remote login of the root account comprises the following steps: modifying a remote login configuration file of the root account to refuse remote login of the root account; modifying UID and GID of the icfs account to change the permission of the icfs account to a normal account, and modifying a login file of the icfs account to allow remote login of the icfs account; copying an environment file under the root account directory to an icfs account directory, and modifying the environment file to adapt to the icfs account; and setting the icfs account to allow the use of process management commands and restarting the sshd service.

[0069] In some embodiments, the method further comprises copying a remote login file under the root account directory to the icfs account directory, and modifying the owner of the remote login file to the icfs account.

[0070] In some embodiments, the method further comprises modifying a limit file under the icfs account to remove the limit on the number of processes running on the storage server node using the icfs account.

[0071] In some embodiments, the method further comprises copying a running file under the root account directory to the icfs account directory, and adding the account name of the icfs account to the running file in the icfs account directory.

[0072] The embodiment of the application disables remote login of the root ssh, ensures that the storage node server has only one superuser permission, changes the icfs account permission to a normal user permission, and ensures that the icfs account login storage server node can normally execute tasks, so that the storage node improves server security and meets customer security baseline requirements.

[0073] Finally, it should be noted that all or part of the processes in the above-mentioned embodiment methods can be implemented by a computer program to instruct relevant hardware, and the program of the method of disabling remote login of the root account can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiment methods. The storage medium of the program can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding any method embodiments.

[0074] The above is the exemplary embodiment disclosed by the application, but it should be noted that various changes and modifications can be made without departing from the scope of the embodiments disclosed by the application defined by the claims. The functions, steps and / or actions of the method claims of the disclosed embodiments described herein need not be performed in any particular order. In addition, although the elements of the embodiments disclosed by the application can be described or claimed in individual form, they can also be understood as plural unless explicitly limited to singular.

[0075] It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising", when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0076] The above-mentioned embodiment serial numbers of the embodiments of the application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0077] It should be understood by those skilled in the art that all or part of the above-mentioned embodiments can be implemented by hardware or by a program to instruct relevant hardware, and the program can be stored in a computer readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0078] Those skilled in the art should understand that the above discussion of any embodiment is only exemplary, and is not intended to mean that the scope of the embodiments disclosed by the present application (including claims) is limited to these examples; under the idea of the embodiments of the present application, the above embodiments or technical features in different embodiments can also be combined, and there are many other changes of different aspects of the embodiments of the present application as above. In order to be brief, they are not provided in details. Therefore, any omission, modification, equivalent replacement, improvement, etc. made in the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. A method for disabling remote login using the root account, characterized in that, Includes the following steps: Modify the root account remote login configuration file to deny root account remote login; Modify the UID and GID of the ICFS account to change the ICFS account's permissions to those of a regular account, and modify the ICFS account's login file to allow remote login to the ICFS account; Copy the environment files from the root account directory to the ICFS account directory, and modify the environment files to suit the ICFS account. as well as Configure the icfs account to allow the use of process management commands and restart the sshd service.

2. The method according to claim 1, characterized in that, The method also includes: Copy the remote login file from the root account directory to the icfs account directory, and change the owner of the remote login file to the icfs account.

3. The method according to claim 1, characterized in that, The method also includes: Modify the restrictions file under the icfs account to remove the limit on the number of processes that can run using the icfs account on the storage server node.

4. The method according to claim 1, characterized in that, The method also includes: Copy the executable file from the root account directory to the icfs account directory, and add the icfs account username to the executable file in the icfs account directory.

5. A system that disables remote login using the root account, characterized in that, include: The first modification module is configured to modify the root account remote login configuration file to deny root account remote login; The second modification module configures the modification of the ICFS account's UID and GID to change the ICFS account's permissions to those of a regular account, and modifies the ICFS account's login file to allow remote login to the ICFS account. The copy module is configured to copy environment files from the root account directory to the ICFS account directory and modify the environment files to suit the ICFS account. as well as The configuration module is used to set up the ICFS account to allow the use of process management commands and to restart the SSHD service.

6. The system according to claim 5, characterized in that, The system also includes a second replication module, configured for: Copy the remote login file from the root account directory to the icfs account directory, and change the owner of the remote login file to the icfs account.

7. The system according to claim 5, characterized in that, The system also includes a third modification module, configured for: Modify the restrictions file under the icfs account to remove the limit on the number of processes that can run using the icfs account on the storage server node.

8. The system according to claim 5, characterized in that, The system also includes a third replication module, configured for: Copy the executable file from the root account directory to the icfs account directory, and add the icfs account username to the executable file in the icfs account directory.

9. A computer device, characterized in that, include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-4.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Reliability testing method based on small file prereading function of Linux system

    CN108829573A

  • User ssh login authentication method

    CN111327578A