solaris 9 sun part certified system administrator i

18
PART I Solaris 9 Sun Certified System Administrator COPYRIGHTED MATERIAL

Upload: others

Post on 08-Dec-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Solaris 9 Sun PART Certified System Administrator I

PART

I

Solaris 9 SunCertified System

AdministratorCO

PYRIGHTED

MATERIA

L

Page 2: Solaris 9 Sun PART Certified System Administrator I
Page 3: Solaris 9 Sun PART Certified System Administrator I

Chapter

1

Introduction to Solaris 9

Page 4: Solaris 9 Sun PART Certified System Administrator I

Welcome to Solaris 9, the latest and greatest operating environ-ment (OE) offering from Sun Microsystems. This book is designed to help you get ready to take and pass the two exams required to

become a Sun Certified System Administrator (SCSA) on Solaris 9.This first chapter provides a bit of history about the Solaris family of operating environ-

ments and gives you information on critical system concepts. Although Chapter 1 does not specifically map to any exam objectives, the information herein is essential base knowledge before proceeding with the rest of the book. The concepts presented in this chapter appear repeatedly throughout this volume, and it will be assumed that you understand them. So without any further delay, let’s take a look at how Solaris has evolved into what it is today.

A Brief History of Solaris

Solaris is based upon UNIX, an operating system that was originally developed in 1969 and became widely available in 1975. UNIX was (and still is) very popular among universities and governmental research facilities. By the time UNIX was released in 1975, it was written in the C programming language, which made it useable by a variety of hardware platforms. The operating system was becoming popular because of its portability as well as its ease of maintenance as opposed to previous lower-level, assembly-language-based operating systems. Even though UNIX is more than 30 years old, it still enjoys considerable usage and it is continually evolving.

The original Sun operating system, released in 1983, was called SunOS and was based on the

Berkeley Software Distribution (BSD)

version of UNIX. The name was changed to Solaris when Sun first bundled OpenWindows with SunOS version 4.1.2 in 1991. The pack-age was known as Solaris 1.0.

Possibly the most confusing part about Solaris is keeping track of the naming conventions. Like many other operating systems, Solaris has gone through a number of revisions and there-fore quite a few titles. The most current versions are the second generation of Solaris (Solaris 2) and are based on UNIX

System V Release 4 (SVR4)

. Solaris 2 was first released in 1992. Solaris 9 is part of the second generation of Solaris and is also referred to as SunOS 5.9. The recent release history for Solaris has been 2.5.1, 2.6, 7, 8, and now 9. Since Sun shifted to the single-number naming scheme, they name their operating system on the minor revision number. In other words, Solaris 7 is SunOS 5.7, and Solaris 8 is SunOS 5.8. So, although it might seem that Solaris 2.6 is ancient (after all, we are on version 9 now), it’s really not that far back in history. Now that you know that Solaris is numbered based on the “minor” revision number, it should come as no surprise that the core architecture of Solaris 9 is in many ways similar to that of Solaris 7. There are just a lot of new bells and whistles.

Page 5: Solaris 9 Sun PART Certified System Administrator I

A Brief History of Solaris

5

To make matters even more confusing, the Solaris 7 operating system is occasionally referred to as Solaris 2.7. This is because it belongs to the second family generation of Solaris (which is also known as SunOS 5.

x

).

Scalable Processor Architecture (SPARC)

chips are based on Reduced Instruc-tion Set Computers (RISC) chip technology, which makes them very quick. SPARC was developed at Sun Microsystems and released in 1986. (As an aside, RISC is basically the alternative to CISC, or Complex Instruction Set Computers,

which is what Intel and all Intel clones are.)

Features of Solaris 7 and 8

The key features of every version of Solaris are too many to list. However, knowing some key features of recent releases of Solaris might help give you perspective as to where this operating system has come from and, possibly, where it’s going.

Here are some key features introduced with Solaris 7, which was released in 1998:

For the SPARC platform, 64-bit computing supported

This feature was added primarily because of consumer demand. It provided for a more powerful operating platform.

UNIX File System (UFS) logging added

This was done to improve file system consistency.

Lightweight Directory Access Protocol (LDAP) included

LDAP is an industry-standard protocol. Because it’s lightweight (read: quick) and reliable, it can be used to manage name databases.

Remote Procedure Call (RPC) security enhanced

Increasing security over networks is never a bad thing.

Domain Name Service (DNS) Berkeley Internet Name Domain (BIND) upgraded to version 8.1.2

At the time, this was the most current BIND version of DNS. BIND 8.1.2 included features such as Dynamic DNS (DDNS), improved zone transfers, and increased security.

Common Desktop Environment (CDE) version 1.3 introduced

CDE greatly simplified end-user access. CDE was originally introduced with Solaris 2.6, and this version provided new features.

Netscape Communicator included

Communicator provided an all-in-one online communica-tions tool, including web browser and e-mail capabilities.

Improved access to AnswerBook2

This made getting answers to questions about Solaris easier.

Solaris 8, released in 2000, had a considerable list of innovations as well. Some of the more notable ones include:

Support for Internet Protocol version 6 (IPv6), the next-generation Internet protocol

This was more of a preemptive upgrade. Eventually, the current IP addressing scheme (IPv4) will be converted to IPv6 worldwide.

Page 6: Solaris 9 Sun PART Certified System Administrator I

6

Chapter 1 �

Introduction to Solaris 9

Role-based access control (RBAC)

RBAC allows users some administrative privileges with-out granting them superuser power.

Graphical Dynamic Host Configuration Protocol (DHCP) manager

This graphical manager greatly eased DHCP administration.

Product Registry

Created as an all-in-one software management interface, this feature enabled administrators to easily manage and delete installed software packages.

Support for the Universal Disk Format (UDF) file system

UDF is used with CD-ROMs, DVDs, and other optical media.

Improved device configuration, through the

devfsadm

command

This eases administration and provides for automatic device configuration.

Smart Card support, based on the Open Card Framework (OCF) 1.1 standard

OCF 1.1 provides for greater security by requiring users to validate with a Smart Card rather than a stan-dard username and password.

SunScreen

Not only is it a catchy name, but it’s a dynamic packet-filtering firewall designed to protect your Solaris servers from would-be hackers.

As you can see, the previous two versions of Solaris have brought about many changes, and the ones listed barely begin to scratch the surface of all the new operating system enhancements.

Features of Solaris 9

Sun realized that their existing operating environments, Solaris 7 and 8, were solid. Although they added new features to Solaris 9, they didn’t try to reinvent the wheel. As with all versions of Solaris, new features have been added for developers, system administrators, and end users. Because this book focuses on achieving system administrator certification, the following list of Solaris 9 features concentrates on system administrator and end-user enhancements. Here are some of the new features of Solaris 9:

Solaris 9 Resource Manager

This allows for detailed control and allocation of system resources, such as processor and memory.

Integrated iPlanet Directory Server

This makes use of the LDAP protocol and provides a distributed directory server capable of managing an enterprise-wide network of users and resources.

Internet Protocol Security (IPsec)

This is now supported in IPv6, as is IPv6 over Asynchronous Transfer Mode (ATM).

Solaris Volume Manager

This enables administrators to create and manage RAID 0, RAID 1, and RAID 5 volumes, transactional devices, soft partitions, and hot spare pools.

Patch Manager

This provides for easy location, installation, tracking, and administration of software patches.

Page 7: Solaris 9 Sun PART Certified System Administrator I

Key System Concepts

7

Enhanced installation features

These include updates to Solaris Live Upgrade and Web Start Flash installation, and a new Minimal Installation feature.

Integrated Secure Shell (SSH)

This supports the SSHv1 and SSHv2 protocol versions.

Enhanced CD features

These changes include the ability to record to Compact Disc-Recordable (CD-R) and Compact Disc-Rewritable (CD-RW) devices with the

cdrw

command.

GNOME 2.0 desktop

This is a popular graphical user interface that runs across multiple UNIX platforms and integrates seamlessly with the Internet.

For a complete listing of new features for a variety of Solaris versions, please visit the Sun documentation website at

http://docs.sun.com

.

Key System Concepts

Understanding the elements listed in this section is the first critical step to understanding how Solaris 9 works. Sun assumes that its certification candidates have a firm grasp of basic system and networking concepts, and doesn’t directly test on such cursory informa-tion. But only after you understand the basics can you master more difficult and testedconcepts.

These concepts are by no means unique to Solaris, or even UNIX for that matter. However, this section is primarily concerned with how these concepts relate to the Solaris operating environment. If you have solid computer experience, you are probably already familiar with most of these ideas, but you might not be sure how they fit into the Solaris world. By reading this section, you will be able to impress your techno-friends with your vast, detailed knowl-edge of often ambiguous computer concepts.

Operating System

An

operating system

should be easy to define, right? After all, we use them every day. The operating system is the under-appreciated workhorse of the software side of your computer. It’s always there, always running (at least in theory), and usually ignored (unless it’s not running).

Operating systems are programs in their own right, with a few express functions. First, they provide an interface between the computer hardware and software. In a sense, they are the translator that makes the hardware and software play nice together. Second, based on the first function, they enable users to run applications. So, operating systems are applications that let you run other applications.

Sun makes a differentiation between an operating system and an

operating environment

. Technically, Solaris 9 is the name of the operating environment built around the SunOS 5.9 operating system. The operating environment consists of the core operating system and all bun-dled features, such as management programs and software. Even though delineation is made, no

Page 8: Solaris 9 Sun PART Certified System Administrator I

8

Chapter 1 �

Introduction to Solaris 9

one at Sun is likely to get mad at someone calling Solaris an “operating system.” At least I hope not, because I will certainly do it a lot in this book.

Kernel and Processes

The

kernel

is the brain of the operating system. Although kernels vary among operating systems, they all have some common characteristics. In the case of UNIX-based operating systems, kernels are written in the C programming language. Kernels are responsible mainly for managing com-puter input/output (I/O), allocating system resources, and managing processes.

Processes

are the running parts of an application. A common misconception is that an appli-cation is a process. That’s not true, because many applications (especially newer games) will be running as multiple processes at one time. Such applications are known as multithreaded appli-cations. Multithreading speeds up the application and allows for smoother execution. System tasks other than applications, such as daemons (which we’ll discuss in just a bit), run as pro-cesses as well. In UNIX, all processes have a process identifier (PID), which is used by the kernel to identify and manipulate the process as needed.

Shells

In UNIX, the

shell

enables users to input information to be interpreted by the operating system. Consider the operating system to be the interface between the computer hardware and software, and the shell to be the interface between the user and the operating system. Shells also enable users to program commonly used or frequently used lists of applications to run with the execution of one command. These are called scripts, macros, or batch files.

Solaris 9 provides multiple shells, and each one has different features. The three most com-mon shells are the Bourne shell (

sh

), the C shell (

csh

), and the Korn shell (

ksh

).

The Bourne shell is the default shell for Solaris 9. Shells will be discussed in

greater detail in Chapter 4, “User and Group Administration.”

Although Sun provides a graphical user interface (GUI) for Solaris 9, the shell itself is command-prompt-based. For example, if you are using the Bourne shell, your prompt will be

$

—unless you are the all-powerful superuser, in which case your prompt will be

#

. Some other operating systems do use GUI shells, such as Windows Explorer. Keep in mind that even though Solaris 9 runs the

Common Desktop Environment (CDE)

GUI by default, CDE is not a shell.

Daemons

Depending on where you look, you can find two common definitions for daemons. The first one describes a

daemon

as a program that runs automatically in the background without the need for user intervention. The second definition is that a daemon provides a service. The ser-vice can be administrative, such as cleaning up temporary files, or the service can be one that

Page 9: Solaris 9 Sun PART Certified System Administrator I

Key System Concepts

9

provides meaningful interaction to clients, such as a print daemon, DHCP server, or DNS server. Daemons run as processes, and can either start automatically when the operating system starts, or be started manually.

File Systems

Like

daemon

, the term

file system

also has various definitions. There are two common ways to look at file systems.

One way to see a file system is as a collection of files that have a similar purpose on one logical section of the hard drive. Solaris provides many such file systems, including the root (

/

),

/etc

,

/usr

,

/opt

,

/var

, and others. These file systems will be further organized by using directories.

Another way to think of a file system is the specific method in which data is stored and orga-nized on the hard drive. All data is written in bits (0s and 1s) in some way or another, but file systems logically make sense of the 0s and 1s. Here are some file systems supported within Solaris 9:�

UNIX File System (UFS) for local hard disks�

High Sierra File System (HSFS) for CD-ROMs�

Universal Disk Format (UDF) for optical media, such as DVDs�

Personal Computer File System (PCFS) for floppy disks�

Network File System (NFS) for networked volumes

We will focus on file systems in greater detail in Chapter 7, “File System

Management.”

Clients and Servers

On networks, computers can be divided into two broad categories: clients and servers. Some operating systems, such as Novell NetWare, are designed to be a server only. Others, such as Microsoft Windows 98, are to be clients only. Solaris 9 is a versatile operating system that can be used as either a client or a server.

As a rule of thumb, end users sit at client machines and perform daily tasks. Clients will often request information (files and applications) from centralized servers, which are located in some sort of server room. Servers should be secured away from prying (or hacking) hands, because they often hold critical and sensitive information.

Clients make requests of servers, and servers fulfill client requests. A computer with the right operating system can function as both a client and a server at the same time. Solaris, and UNIX in general, is a powerful enough operating system to function as a client and a server at the same time.

Page 10: Solaris 9 Sun PART Certified System Administrator I

10

Chapter 1 �

Introduction to Solaris 9

Where to Get Help

As much as you might already know about the Solaris operating environment, you will never know everything there is to know about Solaris. Although my last statement might sound harsh, it’s true. There is so much to know, including commands (and all related switches), concepts, and creative ways to fix problems you might encounter. Even if you know a considerable amount, it’s unlikely that you will have every switch of every command memorized.

Fortunately, there are a number of resources that you can use when you get stuck or simply need a quick refresher. This section highlights the most common resource spots.

man Pages

The man command displays reference manual pages about Solaris commands and concepts. The syntax is man arguments name, where name is the command or file that you want to know about. For example, you could type man -a passwd, which would display all man pages that match the word passwd. You can even type man man to get information on the man command itself. Table 1.1 lists a few of the most common man switches.

When using the man command, the output indicates which section of the reference manual the query was located in. The reference manual is divided into nine sections, which are listed in Table 1.2.

T A B L E 1 . 1 man Command Arguments

Argument Function

-a Shows all manual pages matching name within the search path and displays them in order found

-f file Attempts to locate manual pages related to the specified files

-k keyword Prints one-line summaries from the table of contents that contain any of the given keywords

-l Lists all manual pages found within the search path

-s section Specifies which section number of the reference manual to search

T A B L E 1 . 2 Reference Manual Sections

Section Description

1 User commands

1M System administration commands

Page 11: Solaris 9 Sun PART Certified System Administrator I

Where to Get Help 11

Some words have more than one man page. For example, if you type man passwd, you will find passwd(1) and passwd(4). The passwd(1) page describes the passwd command, and the passwd(4) page describes the passwd file. The Solaris 9 Reference Manual is also available for purchase in printed format. Solaris 9 also comes with the AnswerBook2, which contains a great deal of helpful information.

Online Resources

The docs.sun.com website is an excellent resource if you need to know anything about a multitude of Sun’s products. The entire reference manual is available online, and there is a link specifically for man pages. If the information you’re looking for isn’t on this page, just follow one of the links and you’re likely to find it.

Solaris newsgroups can also provide helpful information. The comp.unix.solaris group is popular; you can either just look at it for information, or post a question if you are looking for an answer. If you don’t already have a newsgroup server that you frequent, you can find comp.unix.solaris at www.Google.com under the Groups section.

A lot of administrators also like to install a local copy of AnswerBook2. It contains much of the same information as docs.sun.com and finding the information you need is a lot quicker.

This Book

Is this just a shameless plug? Not at all. Not only can this book help you pass your SCSA exams, but it can also serve as a useful reference book. Throughout the book, many commands and their commonly used arguments are listed. If you get stuck, you can flip to the section containing the command you want and likely find some help.

2 System calls

3 Programming library functions

4 File formats

5 Standards, environments, and macros

6 Demos and games

7 Device and network interfaces

9 Device Driver Interface (DDI) and Driver/Kernel Interface (DKI) specifications

T A B L E 1 . 2 Reference Manual Sections (continued)

Section Description

Page 12: Solaris 9 Sun PART Certified System Administrator I

12 Chapter 1 � Introduction to Solaris 9

SummaryIn this chapter, you began your Solaris certification journey by looking at a bit of UNIX history. Solaris has gone through many revisions, and Solaris 9 (SunOS 5.9) is based on the UNIX SVR4 standard. You then looked at some key new features of Solaris 9, which include Resource Manager, Volume Manager, Patch Manager, integrated iPlanet Directory Server, integrated Secure Shell, and installation features.

The middle part of this chapter presented some key concepts in Solaris. You looked at Sun’s differentiation between an operating system and an operating environment. Kernels and pro-cesses, shells, daemons, file systems, and clients and servers were explored briefly.

Finally, this chapter indicated places where you can get help. No one will ever know every-thing, so it’s important to be able to find useful information quickly. Besides, your main goal should be to understand the concepts, not remember esoteric commands. Some options for Solaris help include man pages, AnswerBook2, docs.sun.com, and this book.

Exam EssentialsKnow which UNIX standard Solaris is based upon. Solaris 9 is based upon the UNIX System V Release 4 (SVR4) standard.

Know what the default shell is in Solaris 9. The default shell is the Bourne shell (sh).

Understand the difference between a shell and a GUI. A shell processes commands and acts as the interface between the user and the operating system. Although some shells are graphical in nature, there are GUIs (such as CDE and GNOME) that are not shells.

Know which file systems are supported in Solaris 9. Solaris 9 supports UFS, HSFS, UDF, PCFS, NFS, and other file systems.

Know where to get help if you need it. Many help resources are available. Some important ones are man pages, AnswerBook2, docs.sun.com, and this book.

Key TermsBefore you take the exam, be certain you are familiar with the following terms:

Berkeley Software Distribution (BSD) operating system

Common Desktop Environment (CDE) processes

daemon Scalable Processor Architecture (SPARC)

file system shell

kernel System V Release 4 (SVR4)

operating environment (OE)

Page 13: Solaris 9 Sun PART Certified System Administrator I

Commands Used in This Chapter 13

Commands Used in This ChapterThe following list contains a summary of all the commands introduced in this chapter:

Command Description

man Displays online help in the form of reference manual pages.

Page 14: Solaris 9 Sun PART Certified System Administrator I

14 Chapter 1 � Introduction to Solaris 9

Review Questions1. You are the manager of the in-house Solaris 9 computers for your company. One of your

developers is creating a new program to be deployed on one of your servers and is asking about library functions. Which section of the Solaris 9 Reference Manual should you refer her to?

A. Section 1

B. Section 3

C. Section 4

D. Section 8

2. You are the systems administrator for your company. You were just told to set up five Solaris 9 workstations for new employees. As you are installing Solaris 9, one of the employees asks which file system will be installed on the hard drives. What is your answer?

A. UFS

B. UDF

C. HSFS

D. Solaris 9 does not use file systems.

3. You are installing a new Solaris 9 workstation for an employee. During the installation, the employee, who is somewhat familiar with UNIX, asks what the default shell for Solaris 9 is. What do you tell him?

A. Korn

B. Bourne

C. C

D. Bash

4. You are running five applications at once on your Solaris 9 computer. Which part of the operating system is responsible for scheduling and managing all your running applications?

A. Shell

B. Daemon

C. Process Manager

D. Kernel

Page 15: Solaris 9 Sun PART Certified System Administrator I

Review Questions 15

5. One of your Solaris users calls, wondering how to change his password. You tell him to use the passwd command. He’s not sure how to use it and wants additional information. You tell him to type man passwd, which produces multiple outputs, confusing him even more. Which man page do you tell him to look at?

A. passwd(1M)

B. passwd(4)

C. passwd(1)

D. passwd(u)

6. Which of the following are file systems supported in Solaris 9? (Choose all that apply.)

A. HSFS

B. PCFS

C. UFS

D. UDS

E. HPFS

F. FAT

G. NTFS

H. NFS

7. Which of the following are shells supported in Solaris 9? (Choose all that apply.)

A. C

B. Born

C. Corn

D. GNOME

8. One of your network users tells you that she formatted a floppy disk on her Solaris 9 computer and copied some files to that disk. She wonders whether those files can be copied to a Windows-based machine. You tell her that it will work. Why is this?

A. Because the floppy disk was formatted with FDFS, which is also used by Windows-based computers

B. Because the floppy disk was formatted with PCFS, which is also used by Windows-based computers

C. Because the floppy disk was formatted with HSFS, which is also used by Windows-based computers

D. Because the floppy disk was formatted with HPFS, which is also used by Windows-based computers

Page 16: Solaris 9 Sun PART Certified System Administrator I

16 Chapter 1 � Introduction to Solaris 9

9. You are delivering a proposal to management regarding operating systems within your company. You are recommending that the company should switch to Solaris 9. One of the man-agers asks you what operating system Solaris 9 is based on. Which core operating system is it?

A. UNIX BSD

B. UNIX SVR2

C. UNIX SVR4

D. VMS

10. You are delivering a proposal to management regarding operating systems within your com-pany. You are recommending that the company should switch to Solaris 9. One of the managers asks you what UNIX standard Solaris 9 is based upon. What do you tell her?

A. BSD

B. SVR4

C. SVR2

D. SCO

Page 17: Solaris 9 Sun PART Certified System Administrator I

Answers to Review Questions 17

Answers to Review Questions1. B. Section 3 of the reference manual contains information on programming library functions.

Section 1 has user commands, and Section 4 has file formats. Section 8 does not exist.

2. A. For local hard disks, Solaris 9 uses the UFS file system. UDF is used for optical media, and HSFS is for CD-ROMs. And of course, Solaris does indeed use file systems.

3. B. In Solaris 9, the Bourne shell is the default shell. Korn, C, and Bash are also supported shells.

4. D. The kernel schedules and manages processes and resources. The shell is an interface between the user and operating system, and a daemon is a process that runs in the background. Process Manager enables you to display running processes and kill them if necessary. However, it is not responsible for scheduling applications.

5. C. The man page for passwd(1) will contain information on using the passwd command. passwd(4) will contain information on the passwd file.

6. A, B, C, H. Solaris 9 supports the HSFS, PCFS, UFS, and NFS file systems, among others. UDS does not exist as a file system. HPFS, FAT, and NTFS are file systems supported by other operating systems.

7. A. The C shell is supported in Solaris 9. Some of the other supported shells include Bourne and Korn, but not spelled as in the options. GNOME is a graphical user interface, not a shell.

8. B. Floppy disks formatted on Solaris 9 computers use the PCFS file system. HSFS is used for CD-ROMs. FDFS does not exist, and HPFS is not supported by Solaris 9 (or Windows for that matter).

9. C. Solaris 9 has the SunOS 5.9 operating system at its core, which is based on the UNIX SVR4 standard.

10. B. Solaris 9 is based upon UNIX System V Release 4 (SVR4).

Page 18: Solaris 9 Sun PART Certified System Administrator I