1. Trang chủ
  2. » Công Nghệ Thông Tin

Hệ Điều Hành Linux (P3) doc

30 172 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 30
Dung lượng 1,28 MB

Nội dung

< Day Day Up > Page 61 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Page 62 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html More About Logging In This section covers what to do if you have a problem logging in, how to use virtual consoles, how to log in remotely, and how to change your password. What to Do If You Cannot Log In When you enter your username or password incorrectly, the system displays an error message after you enter both your username and your password. This message indicates that you have entered either the login name or the password incorrectly or that they are not valid. It does not differentiate between an unacceptable login name and an unacceptable password to discourage unauthorized people from guessing names and passwords to gain access to the system. Some common reasons that logins fail are listed here:   Log In on the Right Machine  The login/password combination may not be valid if you are trying to log in on the wrong machine. On a larger, networked system, you may have to specify the machine that you want to connect to before you can log in.   Login Name and Password Are Case Sensitive  Make sure the CAPS LOCK key is off and that you enter your name and password exactly as specified or as you set them up.   Make Sure Your Login Name Is Valid  The login/password combination may not be valid if you have not been set up as a user. Refer to "Changing Your Password" on page 37 when you want to change your password. Logging Out To log out from a character-based interface, press CONTROL-D or give the command exit in response to the shell prompt. Using Virtual Consoles When running Linux on a personal computer, you frequently work with the display and keyboard attached to the computer. Using this physical console, you can access as many as 63 virtual consoles (also called virtual terminals). Some are set up to allow logins, whereas others act as graphical displays. To switch between virtual consoles, hold down the CONTROL and ALT keys and press the function key that corresponds to the console you want to view. For example, CONTROL-ALT-F5 displays the fifth virtual console. This book refers to the console that you see when you first boot a system (or press CONTROL-ALT-F1) as the system console (or just console). Typically, six virtual consoles are active and have text login sessions running. When you want to use both a character-based interface and a GUI, you can set up a character-based session on one virtual console and a graphical session on another. Whichever virtual console you start a graphical session from, the graphical session finds the first unused virtual console (typically number seven). Changing Your Password If someone else assigned you a password, it is a good idea to give yourself a new one. A good password is seven or eight characters long and contains a combination of numbers, uppercase and lowercase letters, and punctuation characters. Avoid using control characters (such as CONTROL-H) because they may have a special meaning to the system, making it impossible for you to log in. Do not use names, words from English or other languages, or other familiar words that someone can easily guess. For security reasons none of the passwords you enter is ever displayed by any utility. security: Protect your password Do not allow someone to find out your password: Do not put your password in a file that is not encrypted, allow someone to watch you type your password, give it to someone you do not know (a system administrator never needs to know your password), or write it down. security: Choose a password that is difficult to guess Do not use phone numbers, names of pets or kids, birthdays, words from a dictionary (not even a foreign language), and so forth. Do not use permutations of these items. security: Differentiate between important and less important passwords It is important to differentiate between important and less important passwords. For example, Web site passwords for blogs or download access are not very important; it is not bad if you choose the same password for these types of sites. However, your login, mail server, and bank account Web site passwords are critical: Never use these passwords for an unimportant Web site. To change your password, give the command passwd from a command line: $ passwd Changing password for user zach. Changing password for zach (current) UNIX password: New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. The first item the system asks you for is your current (old) password. This password is verified to ensure that an unauthorized user is not trying to alter your password. Next the system requests the new password. A password should meet the following criteria to be relatively secure. Only the first item is mandatory.   It must be at least six characters long (or longer if the system administrator sets it up that way).   It should not be a word in a dictionary of any language, no matter how seemingly obscure.   It should not be the name of a person, place, pet, or other thing that might be discovered easily.   It should contain at least two letters and one digit.   It should not be your login name, the reverse of your login name, or your login name shifted by one or more characters.   If you are changing your password, the new password should differ from the old one by at least three characters. Changing the case of a character does not make it count as a different character. After you enter your new password, the system asks you to retype it to make sure you did not make a mistake when you entered it the first time. If the new password is the same both times you enter it, your password is changed. If the passwords differ, it means that you made an error in one of them, and the system displays an error message: Sorry, passwords do not match If your password is not long enough, the system displays the following message: BAD PASSWORD: it is too short When it is too simple, the system displays this message: BAD PASSWORD: it is too simplistic/systematic When it is formed from words, the system displays this message: BAD PASSWORD: it is based on a dictionary word If you get one of these messages you need to start over. Press RETURN a few times until the shell displays a prompt and run passwd again. When you successfully change your password, you change the way you log in. If you forget your password, Superuser can change it and tell you your new password. Page 63 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Page 64 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Chapter Summary As with many operating systems, your access to a Linux system is authorized when you log in. You enter your username in response to the login: prompt, followed by a password. You can change your password any time while you are logged in. Choose a password that is difficult to guess and that conforms to the criteria imposed by the utility that changes your password. The system administrator is responsible for maintaining the system. On a single-user system, you are the system administrator. On a small, multiuser system, you or another user act as the system administrator, or this job may be shared. On a large, multiuser system or network of systems, there is frequently a full-time system administrator. When extra privileges are required to perform certain system tasks, the system administrator logs in as the root user by entering the username root and the root password; this user is called Superuser or administrator. On a multiuser system, several trusted users may be given the root password. Do not work as Superuser as a matter of course. When you have to do something that requires Superuser privileges, work as Superuser for only as long as you need to; then revert to working as yourself as soon as possible. The man utility provides online documentation on system utilities. This utility is helpful both to new Linux users and to experienced users who must often delve into the system documentation for information on the fine points of a utility's behavior. The info utility helps the beginner and the expert alike. It includes a tutorial on its use and documentation on many Linux utilities. < Day Day Up > Page 65 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Exercises 1. The following message is displayed when you attempt to log in with an incorrect username or an incorrect password: Login incorrect This message does not indicate whether your username, your password, or both are invalid. Why does it not tell you this information? 2. Give three examples of poor password choices. What is wrong with each? Include one that is too short. Give the error message the system displays. 3. Is fido an acceptable password? Give several reasons why or why not. 4. What would you do if you could not log in? 5. Try to change your password to dog. What happens? Change it to a more secure password. What makes that password relatively secure? < Day Day Up > Page 66 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Advanced Exercises 6. Change your login shell to tcsh without becoming root (Superuser). 7. How many man pages are in the Devices subsection of the system manual? (Hint: Devices is a subsection of Special Files.) 8. The example on page 31 shows that man pages for write appear in sections 1 and 2 of the system manual. Explain how you can use man to determine which sections of the system manual contain a manual page with a given name. 9. How would you find out which Linux utilities create and work with archive files? < Day Day Up > Page 67 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Chapter 3. Command Line Utilities IN THIS CHAPTER Special Characters 42 Basic Utilities 43 less Is more: Displaying a Text File One Screen at a Time 45 Working with Files 45 lpr: Prints a File 47 | (Pipe): Communicates Between Processes 52 Compressing and Archiving Files 56 Obtaining User and System Information 63 When Linus Torvalds introduced Linux and for a long time thereafter, Linux did not have a graphical user interface: It ran on character-based terminals only. All the tools ran from a command line. Today the Linux GUI is important, but many people—especially system administrators—run many command line programs. Command line utilities are often faster, more powerful, or more complete than their GUI counterparts. Sometimes there is no GUI counterpart to a text-based utility; some people just prefer the hands-on feeling of the command line. When you work with a command line interface, you are working with a shell. Before you start working with a shell, it is important to understand something about the characters that are special to the shell, so this chapter starts with a discussion of shell special characters. The chapter then describes four basic utilities you can use to create and manipulate files (ls, cat, rm, and less) and one utility that tells you the name of the system you are using (hostname). It continues with a section on additional file manipulation utilities (including lpr, which prints files), followed by a brief discussion of how you can use a pipe on the command line. This chapter then describes utilities that compress and decompress files, locate other utilities, obtain user and system information, and allow you to communicate with other users. It concludes with a section on email. tip: Run these utilities from a command line This chapter describes command line (i.e., text-based) utilities. You can experiment with these utilities from a terminal, a terminal emulator within a GUI, or a virtual console (page 36). < Day Day Up > Page 68 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Page 69 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html < Day Day Up > Page 70 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html [...]... (Pipe): Communicates Between Processes Because pipes are integral to the functioning of a Linux system, they are introduced here for use in examples Pipes are covered in detail on page 122 A process is the execution of a command by Linux (page 292) Communication between processes is one of the hallmarks of UNIX /Linux A pipe (written as a vertical bar, |, on the command line and appearing as a solid... Up > Page 73 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Basic Utilities One of the important advantages of Linux is that it comes with thousands of utilities that perform myriad functions You will use utilities whenever you use Linux, whether you use them directly by name from the command line or indirectly from a menu or icon The following sections discuss some of... it is useful to incorporate the date in the name of a copy of a file The following example includes the date January 30 (0130) in the copied file: $ cp memo memo.0130 Although it has no significance to Linux, the date can help you find a version of a file that you created on a certain date It can also help you avoid overwriting existing files by providing a unique filename each day Refer to "Filenames"... available only from a GUI The term directory is used extensively in the next sections A directory is a resource that can hold files On other operating systems, including Windows, Macintosh, and frequently Linux GUIs, a directory is referred to as a folder That is a good analogy: A directory is a folder that can hold files tip: In this chapter you work in your home directory When you log in on the system,... broken vertical line on keyboards) provides the simplest form of this kind of communication Simply put, a pipe takes the output of one utility and sends that output as input to another utility Using UNIX /Linux terminology, a pipe takes standard output of one process and redirects it to become standard input of another process (See page 113 for more information on standard input and output.) Most of what... > Page 82 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Four More Utilities The echo and date utilities are two of the most frequently used from the large collection of Linux utilities The script utility helps you record part of a session in a file, and unix2dos makes a copy of a text file that can be read on a Windows machine echo: Displays Text The echo utility copies... memo memo.0714 practice echo Hi $ Hi $ echo This is a sentence This is a sentence $ echo star: * star: memo memo.0714 practice $ The echo utility is a good tool for learning about the shell and other Linux programs Some examples on page 129 use echo to illustrate how special characters, such as the asterisk, work Throughout the chapters explaining the shells, echo helps explain how shell variables... there are multiple copies of a utility or program, which can tell you which copy you will run The slocate utility searches for files on the local system which and whereis: Locate a Utility When you give Linux a command, the shell searches a list of directories for a program with that name and runs the first one it finds This list of directories is called a search path For information on how to change... utilities, however which The which utility locates utilities (commands) by displaying the full pathname to the file for the utility ( Chapter 4 contains more information on pathnames and the structure of the Linux filesystem.) The local system may include several commands that have the same name When you type the name of a command, the shell searches for the command in your search path and runs the first one . utility provides online documentation on system utilities. This utility is helpful both to new Linux users and to experienced users who must often delve into the system documentation for information. introduced Linux and for a long time thereafter, Linux did not have a graphical user interface: It ran on character-based terminals only. All the tools ran from a command line. Today the Linux GUI. utility helps the beginner and the expert alike. It includes a tutorial on its use and documentation on many Linux utilities. < Day Day Up > Page 65 ABC Amber CHM Converter Trial version,

Ngày đăng: 07/07/2014, 09:20

TỪ KHÓA LIÊN QUAN