Donation?

Harley Hahn
Home Page

Send a Message
to Harley


A Personal Note
from Harley Hahn

Unix Book
Home Page

SEARCH

List of Chapters

Table of Contents

List of Figures

Chapters...
   1   2   3
   4   5   6
   7   8   9
  10  11  12
  13  14  15
  16  17  18
  19  20  21
  22  23  24
  25  26

Glossary

Appendixes...
  A  B  C
  D  E  F
  G  H

Command
Summary...

• Alphabetical
• By category

Unix-Linux
Timeline

Internet
Resources

Errors and
Corrections

Endorsements


INSTRUCTOR
AND STUDENT
MATERIAL...

Home Page
& Overview

Exercises
& Answers

The Unix Model
Curriculum &
Course Outlines

PowerPoint Files
for Teachers

Exercises and Answers for Chapter 4...

Starting to Use Unix

Review Question #1:

What is the difference between a user and a userid?

Answer

A user is a person who uses a Unix system. A userid is a name that identifies an account.

Users exist only outside the Unix system; userids exist only inside the system.

Review Question #2:

What are four different ways to log out?

Answer

1. Press ^D to send an eof signal to the shell.

This is the simplest way to log out as long as you are using the login shell. See the discussion on login and non-login shells in Chapter 14 on page 332.

Note: As a safeguard, pressing ^D will not log you out if you have set the IGNOROEOF environment variable (Bash), the ignoreeof shell option (Korn Shell), or the ignoreeof shell variable (Tcsh and C-Shell). This is explained in Chapter 7 starting on page 149.

2. Use the logout command.

3. Use the exit command.

4. Use the login command when you want to log out and then display a login prompt for the next person.

Review Question #3:

You suspect that someone has been using your Unix account without your permission. How do you check to see if this was the case?

Suppose you find out someone has been using your account, but you don't know who it is. How do you stop them?

Answer

To check if someone has been using your Unix account without your permission, use the last command.

To stop someone from using your account, use passwd to change your password.

Review Question #4:

What is the userid of the superuser?

Answer

The superuser userid is root. However, it is possible to create other userids with superuser privileges.

Applying Your Knowledge #1:

Being able to change your password is a basic skill you must master before you start using Unix. Whenever you change your password, you should immediately test to make sure it works properly.

Use passwd to change your password to dontBL8 ("Don't be late").

Log out and back in again to make sure it works.

Then change your password back to what it was originally.

Test again to make sure it worked.

Answer

Enter passwd, then type dontBL8 twice.

Enter login to logout and display a new login prompt.

Log in using the new password.

Enter passwd to change your password back to the original value.

Enter login to logout.

Log in using the original password.

For Further Thought #1:

Unix is case sensitive; that is, it distinguishes between lower case (small letters) and upper case (capital letters). Microsoft Windows is not case sensitive. For example, in Unix, harley and Harley are two completely different names. With Windows, they are the same.

Why do you think the original Unix developers chose to make Unix case sensitive? Why did Microsoft choose to make Windows case insensitive?

Which do you prefer, and why?

Answer

The original Unix developers were computer scientists creating an operating system for other computer scientists and for programmers. To such people, it is clear that "a" is not the same as "A", that is, lowercase letters are completely different from uppercase letters. Thus, it made no sense to create a system in which "harley" would be the same as "Harley".

Microsoft created Windows (and DOS before that) to be used by non-programmers. To such people, it would seem forced and artificial to distinguish between upper- and lowercase because, in English, they are simply different ways of writing the same thing. Moreover, Microsoft would have to provide support to these people, and it was likely that a lot of time would be spent solving problems arising from mistyping letters. For these reasons, it made sense for Microsoft to create a system that did not distinguish between upper and lower case.

Smart people, who understand the difference between upper- and lowercase as used with a computer, usually prefer case-sensitive systems.

For Further Thought #2:

When you use passwd to change your password, the program requires you to type the new password twice. Why?

Answer

When you type your password, it is not displayed on the screen, in case someone else is watching. Typing the password twice forces you to make sure you haven't made a typing mistake. Otherwise, if what you typed was not what you intended, you would not be able to log into your account (because your password would not be what you thought it was).

For Further Thought #3:

Why is it important to have a superuser?

Answer

There are two reasons why it is important to have a superuser.

Security: The superuser needs to carry out tasks that are too important and require too much power to be entrusted to most users. A system is much more secure when only trusted users can wield such power.

Safety: Even experienced system administrators make mistakes. Thus, a smart admin will change to superuser only when he or she needs to perform tasks that require such power. Once the job is done, he or she will log out immediately. This helps prevent the accidents that would surely happen if admins were to always be logged in as superuser.

Jump to top of page