Logging In

 < Day Day Up > 

To log in on a terminal, terminal emulator, or other text-based device, enter your username and password in response to the system prompts. If you are using a terminal (905) and your screen does not display login:, check whether the terminal is plugged in and turned on, and then press the RETURN key a few times. If login: still does not appear, try pressing CONTROL-Q. If you are using a workstation (910), make sure it is running. Run ssh, telnet, or whatever communications/emulation software you have to log in on the system. Try logging in, making sure that you enter your username and password as they were specified when your account was set up; the routine that verifies the username and password is case sensitive. Like most systems, Linux does not echo your password when you enter it.

tip: Make sure TERM is set correctly

The TERM shell variable establishes the pseudographical characteristics of a character-based terminal or terminal emulator. Typically TERM is set for you you do not have to set it manually. If things on the screen do not look right, refer to "Specifying a Terminal" on page 844.


Logging In From a Terminal

The following example shows what it looks like when you log in from a terminal. Max is logging in on the bravo system.

 bravo login: max Password: Last login: Tue Mar  1 19:50:38 from kudos [max@bravo max]$ 

After you log in, the shell prompt (or just prompt) appears, indicating that you have successfully logged in. It shows that the system is ready for you to give it a command. The shell prompt line may be preceded by one or two short messages called the message of the day (or motd) and issue. These messages generally identify the version of Linux that is running, along with local messages placed in either the /etc/motd or the /etc/issue file.

security: Did you log in last?

Immediately after you log in, the system may display information about the last login on this account, showing when it took place and where it originated. You can use this information to see whether anyone else may have accessed this account since you last used it. Perhaps an unauthorized user has learned your password and has logged in as you. In the interest of security, advise the system administrator of the circumstances that made you suspicious and change your password (page 37).


The usual prompt is a dollar sign ($). Do not be concerned if you have a different prompt; the examples in this book will work regardless of what your prompt looks like. In the previous example the $ prompt (last line) is preceded by the username (max), an at sign (@), the system name (bravo), and the name of the directory Max is working in (max). For information on how to change your prompt, refer to page 286 (bash) or page 363 (tcsh).

Logging In Remotely: Terminal Emulation, ssh, and telnet

When you are not using the console, a terminal, or another device connected directly to the Linux system you are logging in on, you are probably connected to Linux using terminal emulation software on another system. This software runs on your computer, connects to the Linux system via a network (e.g., Ethernet, asynchronous phone line, PPP), and allows you to log in on the Linux system.

When you log in via a dial-up line, the connection is straightforward: You instruct the emulator program to contact the computer, it dials the phone, and you get a login prompt from the remote system. When you log in via a directly connected network, you use telnet (not secure, page 792) or ssh (secure, page 773) to connect to the remote system. One of the reasons that telnet is not secure is that it sends your username and password over the network in cleartext (867) when you log in, allowing someone to capture your login information and log in on your account. The ssh utility encrypts all information it sends over the network and, if available, is a better choice than telnet.

From an Apple, PC, UNIX, or other machine, give the command ssh or telnet, followed by the name or IP address (882) of the machine you want to log in on. Following is an example of logging in using ssh:

 $ ssh bravo max@bravo's password: Permission denied, please try again. max@bravo's password: Last login: Wed Mar  2 21:21:49 2005 from bravo.example.com [max@bravo max]$ 

In the preceding example the user mistyped his password, received an error message and another prompt, and retyped the password correctly.

     < Day Day Up > 


    A Practical Guide to LinuxR Commands, Editors, and Shell Programming
    A Practical Guide to LinuxR Commands, Editors, and Shell Programming
    ISBN: 131478230
    EAN: N/A
    Year: 2005
    Pages: 213

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net