Linux Learning Notes (iv) User login

Source: Internet
Author: User

1.Linux is a network operating system, as a multi-user, multi-tasking operating system, its system resources are shared by all users. Anyone who wants to use system resources must first register in the system, register, that is, to open a user account, which also contains the user name, password, the shell used, the use of rights and so on. For the security of the computer system, Linux will be required to enter the system for the user name and password authentication, if the successful verification of the user logon success, or the system refused to log on.



2. The user login is divided into two types, one is the user's terminal login, and the other is remote login, if the user is logged in to the Linux system on the local terminal, the user's terminal login, if the user is logged on through the network Linux system, then Telnet, where through the network login can be LAN and so on. These two types of logins are described in the next step.



3. User Terminal login, when the system started successfully, its system run level is 5, that is, start the XFREE86 system (graphics), so there will be a login interface, require you to enter the user name, and then enter the password, you can log into the Linux system. When we switch the operating level of the system, we will also be asked to enter the user name and password, verify the correct to enter the Linux system.

Note: If you are not very familiar with the system running level and running level switch, you can read this article: http://blog.csdn.net/u012561176/article/details/44248945

(1). The user is divided into ordinary users and super users, if the root account of the superuser is logged in, its terminal prompt is the # number, if it is a normal user login, its terminal prompt is the $ number. If you log in for a normal user, there are some Linux instructions that are not available, such as the Shutdown command, and some permissions, such as the inability to access file resources under root. In a Linux system, Superuser has the highest privileges, for example, it can delete, modify all directories and files on the system, and the content deleted in the command mode is unrecoverable. For system security, avoid the loss caused by misoperation, unless the system management needs, generally do not log in the root account of Superuser.


(2). The Linux system provides 6 Virtual Console terminals, each of which can log into the system. You can switch between these 6 virtual terminals using the CTRL+ALT+FX key combination, where FX represents the F1~f6 key.

Where we press CTRL+ALT+F1, we will switch to the login interface as follows:

If we want to return to the graphical interface, that is, the system run level is 5, you can press CTRL+ALT+F7 to enter the graphical interface.



4. Remote login, refers to the user on a computer through the network to log on to other networked computer systems, the use of resources in the system, such as executing commands, find files, etc., in order to achieve the purpose of resource sharing. Interconnected computers can be located on the same LAN, Metro, WAN, and even any computer connected to the Internet in the world. When a user issues a Telnet request, the Linux system requires the user to enter a user name and password as if it were a local terminal login. If you have sufficient permissions, your computer will be executed on the remote computer like the terminal of the remote computer, and the results will be displayed on your display via the network.

In the Linux operating system, the main commands for remote login are: Telnet,rsh,rlogin and SSH, which are used on the basis of the service provided by the system. For example, to use the Telnet command, you must first turn on the system's Telnet service, generally these system services do not have to open all, all open will waste system resources, resulting in slow running speed, and may leave a security risk. Therefore, we can use the actual command to open the relevant services.

Note: This does not consider remote login security, only the use of remote logins.


The following is a description of the 4 main commands for implementing Telnet:

(1). telnet command: The most common telnet command, but it can only be used in terminal-based environments, either on the Virtual Console terminal or in a terminal window of a graphical interface with a system run level of 5. There are many options and parameters for the Telnet command, but in practical applications it is often used only in its basic usage: Telnet host

Where host refers to the name or IP address of the remote computer to which the user is logged on.


Installation of Telnet

(1). If this system service is not found, it is possible that the system service has not been installed we detect if there is a Telnet package, and if it is already installed, first we enter the command: rpm-q telnet, find this package, and then enter the command: RPM-Q Telnet-server, as shown in:

found that the service is not installed.


(2). Where this installation package is placed under the third CD under computer under the server directory:

Open the server directory, locate the TELNET-0.17.39.EL5.I386.RPM installation package, and here we copy it to the root directory.

We can install it by entering the following command: RPM-IVH--force telnet-server-0.17-39.el5.i386.rpm, after input, installation error:

Here are the prompts for installation errors, which require a xinetd dependency package, so let's install it first.


(3). This requires a xinetd dependency package, which is located in the same place as the Telnet installation package, locates it, and places the xinetd dependency package in the root directory:

Copy this package to the root directory, as shown in:


(4). Enter this command: RPM-IVH--force xinetd-2.3.14-10.el5.i386.rpm, as shown:

This installs the xinetd dependency package, where you can install the Telnet installation package as shown in the following:


Configure the service:
(1). Open service:
Method one: Before using this command, you need to open the corresponding system service, here is using the Telnet service, we can use this command: NTSYSV, after executing the command as shown:


Use the cursor keys or mouse to move the scrollbar to the service item you want to set, press SPACEBAR or click the option box with the mouse, select * indicates, if you do not need the service, then press the SPACEBAR or click the option box with the mouse, no symbol is selected. Where the service is turned on or turned off, how can I click the OK and Cancel buttons, you can use the TAB key to select OK and Cancel. We use the keyboard to move up and down the direction of the search for Telnet system services, find the words can press the space bar to open the service, in the TAB key to select the OK button, click Enter, as shown in:

Clicking OK will open the service.

Method Two: Set the Telnet service to start when the system is started

Use command: Chkconfig telnet on

Method Three: Edit/etc/xinetd.d/telnet

Use command: Gedit/etc/xinetd.d/telnet or vi/etc/xinetd.d/telnet

(2). Activation Service:

Telnet is hung under the xinetd, so naturally as long as the reactivation of XINETD will be able to re-read the settings inside the xinetd, so just set the Telnet can also be activated.

Input command: Service xinetd start, as shown in:


Testing Services:

Next we can use the Telnet command, Telnet IP address or telnet remote computer name, here is not, because I do not have remote computer Linux system to me remotely.

Note: Here is the installation and configuration of the Telnet service, it took too much space, and the complete use of the Telnet command has not been described, and then the complete use of the 4 main commands to implement remote login and corresponding options and instructions to write a special article, if you can speak English, you can use man Telnet command to view the use of the Telnet command, similar to the other three.


(2). rlogin command: This command is very similar to the Telnet command in the use of methods and options, and is also used to log on to a remote computer. If the login is successful, you can perform any action allowed on the remote computer for that registered account permission.

Its basic usage is: Rlogin rhost, where Rhost refers to the name and IP address of the remote computer to which the user is logged on, and its full usage can be viewed using the man rlogin command.


(3) rsh command: The shell used to start the remote computer and let the shell execute commands specified in the permission range.

The basic usage is: RSH host [command], where host refers to the name or IP address of the remote computer to be logged on to, and command is for commands to be executed by the remote computer shell. If the parameter command is omitted, the RSH command will invoke the Rlogin command to log on to the remote computer.


(4) SSH client command: SSH (SSH client) is a program that implements a command to log on to a remote computer and execute commands on it. Due to the security issues of the rlogin and RSH commands, they will be replaced by SSH commands. SSH provides secure encrypted communication between two untrusted (unreliable) computers on an unsecured network, and the X11 connection and any TCP/IP port can be forwarded on a secure channel.

The SSH command establishes the connection and logs the specified host name in the log file. Users must take one of several methods to prove their identity to a remote computer, depending on the protocol version being used.

Its basic usage is: SSH [-l LOGIN_NAME] hostname | [email protected] [command], where hostname or [email protected] is the name, IP address or domain name of the remote computer to be logged on to, Login_name is the registered user name of the login, command for commands to be executed by the remote computer shell.


Note: For the above 4 implementation of the remote login command only the basic usage, its full use can be used by the man telnet similar commands to view, but all in English, and so on to introduce the full use of these 4 commands.



5. The above content is only for your study reference, write not good, please forgive me, if there are errors, please point out, thank you!



Linux Learning Notes (iv) User login

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.