In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "Inittab startup configuration file maintenance method". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
I believe that the importance of the inittab configuration file does not need to be explained too much by the author. To cut to the chase, I'll talk about some things to watch out for when maintaining this profile.
I. What if the inittab file cannot be started after modification?
The contents of the Inittab file are like the registry in Microsoft operating systems. If the system administrator changes incorrectly during the adjustment, it may cause the operating system to fail to boot correctly. When this happens, is there anything the system administrator can do other than reinstall the Linux operating system? You don't need to reinstall to fix the inconvenience caused by accidental and inaccurate modification of this inittab file. That is, system administrators can enter the operating system in single-player mode at startup. Even if the inittab file is a mess, you can still log into the operating system in single-user mode. Then re-modify the file until the changes are accurate.
If the user uses the GRUB boot manager (which is used by most Linux operating systems), press the a key when the menu screen appears at boot time to enter single user mode. If you are using LILO boot management program, press Ctrl+X key when starting to display LILO boot menu screen. When switching to LILO landing screen in text mode, enter inux s command. At this point the system will automatically wait in single-user mode until the operating system.
However, some system administrators are unable to do anything about it even if they are able to log in successfully to the operating system in single-user mode. Because they don't know exactly what the inittab file has changed since the last successful login. In order to restore this file smoothly in the future, the author has two suggestions. First of all, when making changes to the inittab file, *** at the beginning of the file and where the changes are made, the content and reason of the famous changes. A good memory is not worth a bad pen. In case the system fails to log in properly after modification, these remarks can be used to readjust the relevant parameters. Second, *** make a backup of these configuration files before modifying them. In this case, even if you don't know what has been changed, you just need to overwrite the file with the original backup content. Therefore, before modifying this configuration file, *** the system administrator will make a backup.
Switch between text mode and graphics window.
After the operating system is started, what form does the system automatically log in? The Linux operating system differs from the Windows operating system in that it has two options. That is, the system administrator can log in to the operating system in text mode when the operating system is started, or directly enter the window management mode when it is started. Specifically, what mode is used when logging in is controlled by this inittab file. If you have a system administrator, you may not be familiar with text mode operation. For this reason, when installing a database software, it is first entered into the graphical management interface. After the database is deployed and put into production use, the system administrator wants the operating system to log in text mode the next time it logs in, rather than enabling graphical administration windows. In other words, let the operating system log in directly in text mode after restarting. How to adjust the inittab file to fulfill this requirement.
Before I talk about how to change this file, I emphasize again that I should backup this file in case of emergency. You can then use any of the operating system's native text editors, such as vim, to open this configuration file. Then in this file you will find a default boot level configuration. id:5:initdefault. This means that by default, the system logs in to the graphical management interface. If the system administrator wants the user to log in in text mode by default, then you can modify the contents of this line to achieve this. The modification method is also very simple, just need to modify the content of this line to id:3:initdefault. When the activation level is 3, it indicates that text mode is used. The next time the operating system restarts, it will go straight to the text-only login screen. The next time the user needs to use the graphical interface, you can change this option back to 5. Or, in text mode, run startx directly. However, the final effect of the two is different. If you modify it by modifying the inittab file, the effect is ***. In other words, if you change from 3 to 5, you will log in to the graphical management interface the next time you restart. But if you press startx in text mode to launch the graphical admin window, it only works for the current drawing. The next time the operating system restarts, text management mode remains by default. For this small difference, users need to pay attention. *** It should be noted that after the modification is completed, *** can be followed by a comment. Such as what changes were made at what time and for what reason. This is a great help for the maintenance required.
Third, the text mode account prompt content.
When you enter the correct username and password to log in to the operating system in text mode, the system will display the following prompt:
[root @aap root]#
What does this prompt tell us? First, we know that the user is currently using root(*** parameters from left to right). Secondly, we can know that the name of this host is app.@ The content after the symbol indicates the name of the host. *** A root of represents the directory name of the current user. If logged in as privileged user root, the home directory assigned by the system is/root. If you are using a normal user, then when you create a user account, you create a user folder named after his user name in the/home directory. When logged in text mode, the system automatically navigates to the user's home directory. *** A prompt #is also a symbol indicating the identity of the user. If the actual symbol is #, it means that the current login account is a privileged account. If the symbol displayed is $, it indicates that the current account is a normal user. In DOS command windows on Windows operating systems, prompts do not change with user identity. This feature of the Linix operating system is very similar to network operating systems such as Cisco, which change their prompts as the operating system identity changes. To some extent, this can be a reminder to the system administrator.
If you are using the single-user mode mentioned above, this prompt is very different. In general, in single-user mode, the prompt format is "shell version #." Also note that in single-user mode, it is impossible to enter graphics management mode.
4. Use single-user mode to let the system log in automatically.
In addition to fixing inittab file errors that cannot be modified in single-user mode, there are some special effects. For example, when the operating system is used by only one user and no other users exist, the system administrator can set the operating system to single user mode. At this point, after each restart, the administrator does not need to log in, enter the user name and password program every time he starts, that is, the process of authentication is not required. You can also change the Inittab file so that the operating system logs in in single-user mode every time. In this case, you can change id:5:initdefault to 1. Startup level 1 indicates single-user mode. However, this model is not recommended by the author. Because in this mode, without username and password protection, anyone can use the computer. Obviously, the operating system has lost its ** protection and is very insecure. Secondly, since the graphical management interface cannot be launched in single-user mode, this may not be applicable to most users.
For this reason, single-user mode is often used only to complete some special tasks. As mentioned above, if the inittab file fails to boot due to corruption, you can log in to the operating system in single-user mode to repair the file. Another important use of single-user mode is to log in to single-user mode when you forget the password for the root privileged account. Because username and password authentication is not required in single user mode. After logging in, reset the root password.
"Inittab startup configuration file maintenance method" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
1. Install the kvmcentos7 command 2. To install wok, you must open it first.
© 2024 shulou.com SLNews company. All rights reserved.