Professional Documents
Culture Documents
Solaris 9
System Administration Part 1
Prepared by Dzafir Jaffar
Solaris 9 System Administration Part 1
Table of Contents
Prerequisites ...................................................................................................................................................................... 4
File System s ....................................................................................................................................................................... 4
Root Subdirectories ........................................................................................................................................................... 4
File Types........................................................................................................................................................................... 6
Filenames, Inodes and Data Blocks .................................................................................................................................. 7
Hard Links .......................................................................................................................................................................... 7
Disk Architecture ................................................................................................................................................................ 8
Physical Structure .......................................................................................................................................................... 8
Disk Com ponents ........................................................................................................................................................... 8
Disk Slices ...................................................................................................................................................................... 9
Disk Slice Nam ing Convention ....................................................................................................................................... 9
How to List Devices............................................................................................................................................................ 9
The /etc/path_to_ inst File ............................................................................................................................................... 9
The prtconf Com m and ................................................................................................................................................. 10
The form at Comm and .................................................................................................................................................. 11
How to reconfigure devices.............................................................................................................................................. 11
Disk Partitioning ............................................................................................................................................................... 12
File System Types............................................................................................................................................................ 16
Disk-Based File Systems ............................................................................................................................................. 16
Distributed File Systems .............................................................................................................................................. 16
Pseudo File System s ................................................................................................................................................... 17
How to create a ufs File System ...................................................................................................................................... 17
How to Mount File Systems ............................................................................................................................................. 17
Mount Points and the m ount Com m and ....................................................................................................................... 17
Mounting a File System ................................................................................................................................................ 18
The Virtual File System Table (vfstab)............................................................................................................................. 18
Softw are Installation ........................................................................................................................................................ 19
System Requirements...................................................................................................................................................... 19
Before You Begin ............................................................................................................................................................. 20
Software Packages .......................................................................................................................................................... 20
Package Inform ation .................................................................................................................................................... 20
Package Installation ..................................................................................................................................................... 22
Package Check ............................................................................................................................................................ 23
The var/sadm/inst all/contents File ................................................................................................................................ 24
The B oot PR O M ................................................................................................................................................................ 24
What is the Boot PROM................................................................................................................................................... 24
What is NVRAM? ............................................................................................................................................................. 25
Boot PROM commands ................................................................................................................................................... 25
Boot PROM Version Identification ................................................................................................................................ 25
Boot The System .......................................................................................................................................................... 25
List/Change NVRAM Parameters ................................................................................................................................. 25
Display Devices Connected to the Bus ........................................................................................................................ 26
Identify Boot Device ..................................................................................................................................................... 26
Page 2 of 46
Solaris 9 System Administration Part 1
Page 3 of 46
Solaris 9 System Administration Part 1
Prerequisites
It will be very beneficial to have access to a Sparc system running Solaris 9. If you do not have Solaris 9 installed on
your Sparc system, you can download it free of cost at:
http://survey1.sun.com/servlet/viewsflash?cmd=showform&pollid=sol9_download
File System s
Root Subdirectories
There are several root directories that are created upon the installation of the Solaris Operating System. Each of these
directories resides under the root (/) directory and serves a special purpose.
Think of a / directory as the equivalent of the root of the C drive in Windows. Everything else must be under
“C:\”; for example, “C:\Windows\”
/bin – This directory is a symbolic link to the /usr/bin directory which stores binary files or system commands
Think of a binary or binary file as the equivalent of a program or exe file in Windows. We will talk more about
symbolic links later in this section
Note: Names in this directory will look like the following examples:
/devices – This directory stores physical device names and device files
Page 4 of 46
Solaris 9 System Administration Part 1
/export – This is the default directory for commonly shared file systems. These include user home directories
and client file systems
/home – This is the default location or mount point for user home directories
/kernel - Directory of kernels required as part of the boot process. These kernels are platform-independent
/sbin – Executables used in the boot process as well as a manual system recovery
/tmp – Directory for temporary files. These files are cleared every time the system is rebooted.
/usr – USR is an acronym for UNIX System Resources. It holds many different components and files required by
the operating system. A few examples of the directories under the /usr directory are as follows:
/usr/bin – system commands
/usr/dt - Common Desktop Environment (CDE) software
/usr/java - Directories containing Java programs and libraries
/var – Directory for varying files. This usually includes log or temporary files
Page 5 of 46
Solaris 9 System Administration Part 1
File Types
There are four main file types in the Solaris Operating Environment.
Regular files
Directories
Symbolic Links
Device Files
The first three file types store data. Device files do not store data. They provide access to devices. It is very easy to
differentiate between them by using the ls command.
# cd /etc
# ls -l
total 458
drwxr-xr-x 2 adm adm 512 Jun 20 18:26 acct
lrwxrwxrwx 1 root root 14 Jun 20 17:50 aliases -> ./mail/aliases
drwxr-xr-x 2 root bin 512 Jun 20 18:30 apache
-rw-r--r-- 1 root bin 83 Jun 20 20:34 auto_home
-rw-r--r-- 1 root bin 113 Jun 20 17:50 auto_master
<Output Truncated>
# cd /devices/pci@1f,0/pci@1,1/ide@3
# ls –l
total 0
brw-r----- 1 root sys 136, 0 Jun 20 17:57 dad@0,0:a
crw-r----- 1 root sys 136, 0 Jun 20 17:57 dad@0,0:a,raw
brw-r----- 1 root sys 136, 1 Jun 20 17:57 dad@0,0:b
crw-r----- 1 root sys 136, 1 Jun 20 17:57 dad@0,0:b,raw
<Output Truncated>
- – Regular files
Page 6 of 46
Solaris 9 System Administration Part 1
d – Directories
l – Symbolic links
Inode – Object used to record information about a file. This information includes size, permissions, ownership
and pointers
Hard Links
The association between a file name and an inode is called a hard link. Think of a filename as a hard link to an inode.
Let’s create a file and then link it.
Page 7 of 46
Solaris 9 System Administration Part 1
total 0
721025 -rw-r--r-- 2 root other 0 Jun 22 15:38 file1
721025 -rw-r--r-- 2 root other 0 Jun 22 15:38 file2
As you can see, the inodes for both files are identical. This means that both the filenames point to the
same physical location. In other words, inode 721025 has two hard links. One to file1 and the other for
file2.
Even though we deleted one of the files the same information can be accessed via the filename “file2.”
Disk Architecture
Physical Structure
If you have ever opened a hard disk enclosure, you know that it is made up of magnetic platters stacked on a spindle.
The spindle spins at high speeds while the heads move between them reading and writing data. The heads are moved
by the head actuator arm.
Disk Components
Each disk platter is further divided into the following components:
Sector – Also known as a disk block, a sector is the smallest addressable unit on a platter. Each sector contains
512 bytes
Page 8 of 46
Solaris 9 System Administration Part 1
Disk Slices
Each disk can be divided into logical partitions known as slices. Slices are groupings of cylinders and are used to
organize data by function.
Controller Number – Identifies the host bus adapter, which controls communications between the system and
disk unit
Target Number – Target numbers correspond to a unique address switch setting that is selected for each
disk, tape, or CD-ROM
Disk Number – The disk number indicates the number of disks at the target location. The disk number is often
referred to as the logical unit number (LUN)
Slice Number – A number between 0 and 7 that identifies a logical partition on the physical disk
# more /etc/path_to_inst
#
# Caution! This file contains critical kernel state
#
"/pci@1f,0" 0 "pcipsy"
Page 9 of 46
Solaris 9 System Administration Part 1
In order to get a list of connected devices, we are filtering the output of the prtconf command by using “grep –v not”.
The “grep –v not” command is used to omit all lines that contain the word “not.”
SUNW,Ultra-5_10
options, instance #0
pci, instance #0
pci, instance #0
Page 10 of 46
Solaris 9 System Administration Part 1
ebus, instance #0
power, instance #0
se, instance #0
su, instance #0
su, instance #1
fdthree, instance #0
SUNW,CS4231, instance #0
network, instance #0
SUNW,m64B, instance #0
ide, instance #0
dad, instance #0
sd, instance #0
pci, instance #1
pseudo, instance #0
# format
Searching for disks...done
# touch /reconfigure
# init 5
Page 11 of 46
Solaris 9 System Administration Part 1
7. Use the prtconf or the format command to verify that the peripheral device has been detected
and added.
Disk Partitioning
The format command is used to repartition disks.
2. Select the disk that you wish to work on. In our example, we will work on disk zero.
3. Type partition.
4. Type print.
6. Type a name for the new slice or press Return to keep the default. You can also type ? to get a list of
choices.
11. Enter a new partition size. In this example, we are not changing anything.
Page 12 of 46
Solaris 9 System Administration Part 1
Now, let’s take a look at an example to get familiar with the menus. In this example, we will not really
change anything but will run through the menus.
# format
Searching for disks...done
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> partition
Page 13 of 46
Solaris 9 System Administration Part 1
PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
7 - change `7' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
!<cmd> - execute <cmd>, then return
quit
partition> print
Current partition table (original):
Total disk cylinders available: 17660 + 2 (reserved cylinders)
partition> 0
Part Tag Flag Cylinders Size Blocks
0 root wm 1041 - 4458 1.64GB (3418/0/0) 3445344
Page 14 of 46
Solaris 9 System Administration Part 1
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> quit
Page 15 of 46
Solaris 9 System Administration Part 1
Unix File System (ufs) – Based on the Berkeley fast file system, this is the standard UNIX file system.
High Sierra File System (hsfs) – A special file system developed for CD-ROM media.
PC File System (pcfs) – A UNIX implementation of the FAT32 file system found in DOS/Windows.
Universal Disk Format (udf) – A special optical storage file system for DVD and CD-ROM media.
Network File System (nfs) – Allows files sharing between different systems in a network.
Page 16 of 46
Solaris 9 System Administration Part 1
Temporary File System (tmpfs) – This file system is created at boot time and is not persistent. It is “flushed”
when the system is rebooted. The file system is used for file storage in memory without the I/O overhead
associated with disk-based file systems.
Swap File Systems (swapfs) – Used by the kernel to manage the swap space on disks.
File Descriptor File System (fdfs) – Provides names for opening files using file descriptors such as /dev/fd/0.
Process File System (procfs) – Contains a list of active processes. The list is stored in the /proc directory.
1. Type the newfs command for the partition you want to build the file system on; e.g., newfs /dev/rdsk/c1t3d0s0.
2. Type y to proceed.
That’s all there is to creating an ufs file system. However, the new partition must be mounted before it can be used.
# mount
/ on /dev/dsk/c0t0d0s0
read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=2200000 on Thu Jun 20
18:41:03 2002
/proc on /proc read/write/setuid/dev=38c0000 on Thu Jun 20 18:41:02 2002
/etc/mnttab on mnttab read/write/setuid/dev=3980000 on Thu Jun 20 18:41:02 2002
/dev/fd on fd read/write/setuid/dev=39c0000 on Thu Jun 20 18:41:04 2002
/var/run on swap read/write/setuid/xattr/dev=1 on Thu Jun 20 18:41:16 2002
Page 17 of 46
Solaris 9 System Administration Part 1
This would mount the slice seven on disk zero as the home directory. Since we did not specify any file
system options, ufs is used by default. If another file system is required, it must be specified. This is
most commonly used with floppy disks. For example,
# cat /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes
-
swap - /tmp tmpfs - yes -
Notice that these fields do not align properly because they are tab separated. This can lead to confusion. It appears
correctly formatted on the screen. Here is the output copied and pasted in the Solaris Text Editor.
Page 18 of 46
Solaris 9 System Administration Part 1
64MB of RAM
Notice that the Intel platform is no longer supported. The software spans 3 CD-ROMs.
Page 19 of 46
Solaris 9 System Administration Part 1
Host Name
Geographic Region
Root Password
Language to install
Software Packages
Similar to a setup.exe file that we are familiar with on a Windows platform, software products for the Solaris platform
are called packages. These are basically a collection of files and directories.
Package Information
In the following example, we are using the pkginfo command and filtering for lines that contain the word “application.”
The pkginfo command displays the category, package instance and names of all installed packages.
Page 20 of 46
Solaris 9 System Administration Part 1
Utility
application SUNWj2pi Java Plug-in
application SUNWjhdem JavaHelp Demos
application SUNWjhdev JavaHelp Development Utilities
application SUNWjhdoc JavaHelp Documentation
<Output Truncated>
To get information about a particular application, you would need to specify a name.
For example:
# pkginfo -l SUNWman
PKGINST: SUNWman
NAME: On-Line Manual Pages
CATEGORY: system
ARCH: sparc
VERSION: 42.0,REV=58
BASEDIR: /usr
VENDOR: Sun Microsystems, Inc.
DESC: System Reference Manual Pages
PSTAMP: tinkertoym01184752
INSTDATE: Jun 20 2002 18:28
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 7268 installed pathnames
3 shared pathnames
85 directories
85786 blocks used (approx)
Page 21 of 46
Solaris 9 System Administration Part 1
Package Installation
You can use the pkgadd command to install an application from an installation source. The usual syntax is as follows:
In the following example, we will initiate an installation but will not complete it:
# pkgadd -d /cdrom/cdrom0/s0/Solaris_9/Product/
<Output Truncated>
Page 22 of 46
Solaris 9 System Administration Part 1
The following files are being installed with setuid and/or setgid
permissions:
* /usr/bin/admintool <setuid root>
Package Check
The pkgchk command checks the contents and attributes of an installed package. For example:
# pkgchk SUNWadmap
# pkgchk -v SUNWadmap
/usr
/usr/bin
.
.
<Output Omitted>
Page 23 of 46
Solaris 9 System Administration Part 1
.
.
/usr/snadm/lib/libnsnis.so.1
/usr/snadm/lib/libnsnisplus.so
/usr/snadm/lib/libnsnisplus.so.1
/usr/snadm/lib/libnsnone.so
/usr/snadm/lib/libnsnone.so.1
#
$ more /var/sadm/install/contents
/bin=./usr/bin s none SUNWcsr
/dev d none 0755 root sys SUNWcsr SUNWcsd
/dev/allkmem=../devices/pseudo/mm@0:allkmem s none SUNWcsd
/dev/arp=../devices/pseudo/arp@0:arp s none SUNWcsd
/dev/conslog=../devices/pseudo/log@0:conslog s none SUNWcsd
/dev/console=../devices/pseudo/cn@0:console s none SUNWcsd
<Output Truncated>
Page 24 of 46
Solaris 9 System Administration Part 1
What is NVRAM?
The Non-Volatile Random Access Memory (NVRAM) is another key component in the Sun system. NVRAM stores the
Ethernet address, host ID, and time.
ok boot
ok printenv
To display a specific parameter, type the printenv command followed by the parameter name. For example:
ok printenv boot-device
boot-device = disk:a disk net
Page 25 of 46
Solaris 9 System Administration Part 1
To change or set a NVRAM parameter, you can use the setenv command. In this example, we will check the current
value for auto-boot and then change it:
ok printenv auto-boot?
auto-boot? = true
ok
ok setenv auto-boot? False
ok reset
Resetting ...
The reset command commits changes to the NVRAM and resets the system.
ok show-devs
<Output Omitted>
Other commands to list and identify peripheral devices include the following:
probe-ide
probe-scsi
probe-scsi-all
ok printenv boot-device
boot-device = disk
ok devalias
screen /pci@1f,0/pci@1,1/SUNW,m64B@2
net /pci@1f,0/pci@1,1/network@1,1
Page 26 of 46
Solaris 9 System Administration Part 1
cdrom /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f
disk /pci@1f,0/pci@1,1/ide@3/disk@0,0
disk3 /pci@1f,0/pci@1,1/ide@3/disk@3,0
disk2 /pci@1f,0/pci@1,1/ide@3/disk@2,0
disk1 /pci@1f,0/pci@1,1/ide@3/disk@1,0
disk0 /pci@1f,0/pci@1,1/ide@3/disk@0,0
ide /pci@1f,0/pci@1,1/ide@3
floppy /pci@1f,0/pci@1,1/ebus@1/fdthree
ttyb /pci@1f,0/pci@1,1/ebus@1/se:b
ttya /pci@1f,0/pci@1,1/ebus@1/se:a
keyboard! /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8:forcemode
keyboard /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8
mouse /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8
name aliases
The nvalias command is used to create custom device aliases and is used as follows:
For example:
As we learned previously, the setenv command can be used to set this newly created disk as the boot device.
Page 27 of 46
Solaris 9 System Administration Part 1
# eeprom
tpe-link-test?=true
scsi-initiator-id=7
keyboard-click?=false
keymap: data not available.
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,-
ttya-mode=9600,8,n,1,-
pcia-probe-list=1,2,3,4
pcib-probe-list=1,2,3
mfg-mode=off
diag-level=max
#power-cycles=56
system-board-serial#: data not available.
system-board-date: data not available.
fcode-debug?=false
output-device=screen
input-device=keyboard
load-base=16384
boot-command=boot
auto-boot?=true
watchdog-reboot?=false
diag-file: data not available.
diag-device=net
boot-file: data not available.
boot-device=disk:a disk net
local-mac-address?=false
ansi-terminal?=true
screen-#columns=80
screen-#rows=34
Page 28 of 46
Solaris 9 System Administration Part 1
silent-mode?=false use-nvramrc?=false
nvramrc: data not available. security-mode=none
security-password: data not available. security-#badlogins=0
oem-logo: data not available. oem-logo?=false
oem-banner: data not available.
oem-banner?=false
hardware-revision: data not available.
last-hardware-update: data not available. diag-switch?=false
# eeprom boot-device
boot-device=disk:a disk net
# eeprom boot-device=cramdisk
#
Page 29 of 46
Solaris 9 System Administration Part 1
There are several strategies that can be used to interrupt an unresponsive system.
4. Synchronizing the file system using the OpenBoot PROM (OBP) sync command. This causes the system to
create a crash dump of the memory and reboot.
Phase Details
Page 30 of 46
Solaris 9 System Administration Part 1
/sbin/init – Can be used with run levels S, 1, 0, 5 or 6 to shut down, power off, or reboot the system gracefully.
This command performs an immediate shutdown without warning to logged on users
/usr/sbin/shutdown – Works just like the init command except that it delays the shutdown for 60 seconds (by
default) and warns users with a default or customized message
/usr/sbin/halt – Performs an immediate shutdown without notification to users. Stops the Solaris Operating
Environment and brings the system to an ok prompt
/usr/sbin/reboot – Performs an immediate shutdown without notification to users and brings the system to a run
level 3 by default
Password – A combination of six or more letters, numbers or special characters that must be entered with a user
name to access a system
User’s Home Directory – A directory that the user is placed in upon login
User’s Login Shell – A work environment set up by the initialization files defined by the user’s login shell. The
Bourne shell, K shell, C shell, Z shell, BASH shell and the TC shell are the six possible shells that a user may be
assigned
Page 31 of 46
Solaris 9 System Administration Part 1
User Initialization Files – Shell scripts that determine how the work environment is set up for the user
User Creation
Users can be added to the local system by using the useradd command. This command adds an entry for the user to
the /etc/passwd and /etc/shadow files.
For example:
Shell: K Shell
User Modification
Users can be modified on the local system by using the usermod command
For example, the following command renames cramusr1 to cramusr2 while retaining all its properties:
Page 32 of 46
Solaris 9 System Administration Part 1
User Deletion
The userdel command can be used to delete a user’s account from a system. It can also remove the user’s home
directory and its contents if used with the “-r” option.
For example:
# userdel –r cramusr2
For example, the following command creates a new group account called cramusrs with a group ID of 301.
In the following example, we will change the Group ID (GID) from 301 to 400:
In the following example, we will delete the cramusrs group account from the local system:
# groupdel cramusrs
Page 33 of 46
Solaris 9 System Administration Part 1
Notice the difference between the two files (especially the “x” following a user name):
# cat /etc/passwd
root:x:0:1:Super-User:/:/sbin/sh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
uucp:x:5:5:uucp Admin:/usr/lib/uucp:
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
smmsp:x:25:25:SendMail Message Submission Program:/:
listen:x:37:4:Network Admin:/usr/net/nls:
nobody:x:60001:60001:Nobody:/:
noaccess:x:60002:60002:No Access User:/:
nobody4:x:65534:65534:SunOS 4.x Nobody:/:
athar:x:100:0::/home/athar:/bin/sh
# cat /etc/shadow
root:s5JR561b9zPVs:6445::::::
daemon:NP:6445::::::
bin:NP:6445::::::
sys:NP:6445::::::
adm:NP:6445::::::
lp:NP:6445::::::
uucp:NP:6445::::::
nuucp:NP:6445::::::
smmsp:NP:6445::::::
listen:*LK*:::::::
nobody:NP:6445::::::
noaccess:NP:6445::::::
nobody4:NP:6445::::::
athar:QROSXsUei6iEU:11859::::::
Page 34 of 46
Solaris 9 System Administration Part 1
# touch /var/adm/loginlog
Once this file has been created, all failed login activity after five attempts is recorded in this file automatically. If there
are fewer than five failed attempts, the file will not contain any information.
Once the file is created, and we purposefully enter incorrect passwords at a telnet session, the following message is
displayed in a terminal window on the console:
# Jul 7 15:25:07 unknown login: REPEATED LOGIN FAILURES ON /dev/pts/4 FROM dhcp-249-
16-75.mydomain.com, athar
# cat /var/adm/loginlog
athar:/dev/pts/4:Sun Jul 7 15:24:24 2002
athar:/dev/pts/4:Sun Jul 7 15:24:30 2002
athar:/dev/pts/4:Sun Jul 7 15:24:37 2002
athar:/dev/pts/4:Sun Jul 7 15:24:44 2002
athar:/dev/pts/4:Sun Jul 7 15:25:03 2002
Page 35 of 46
Solaris 9 System Administration Part 1
# who
root pts/3 Jul 7 15:41 (mylaptop.mydomain.com:6954.0)
root dtremote Jul 4 23:39 (mylaptop.mydomain.com:6954)
Also, the last command is used to display a record of system access. It obtains this information from the
/var/adm/wtmpx file.
# last
athar ftp mylaptop.mydomai Sun Jul 7 15:30 still logged in
root dtremote mylaptop.mydomai Thu Jul 4 23:39 still logged in
<Output Omitted>
wtmp begins Thu Jun 20 18:40
Solaris Operating Environment Print Manager – A new graphical tool that enables system administrators to
configure and manage printers both on the local as well as remote systems. This tool is preferred over admintool
and can be started from /usr/sadm/admin/bin/printmgr
admintool – An older graphical tool used to set up and manage printers on a local system
LP print service commands – A command line interface used to perform the same functions as the previous
two tools
Page 36 of 46
Solaris 9 System Administration Part 1
Network Printer – A printer attached to the network with its own hostname and IP address without being
attached to a print server
Initialization – The service initializes the printer to ensure that it is in a known state before it sends a print
request
Tracking – The service tracks the status of all print requests. This allows users to view and cancel their own
requests. And, it allows root to manage them if necessary. Any errors that occur are logged by the tracking
feature
Fault Notification – In the event that a print request cannot be fulfilled, this feature of the service notifies the
user either by a message on the console or via email
/usr/share/lib/terminfo – Contains terminfo database which contains printer and terminal capabilities
/usr/lib/lp – Contains lpsched daemon, binary files used by the print service, postscript filters and default printer
interface programs
/etc/lp – Contains a hierarchy of LP server configuration directories and files. This directory is maintained by the
lpsched daemon and should not be edited manually
Page 37 of 46
Solaris 9 System Administration Part 1
/etc/lp/printers – Contains a directory for each local printer. These subdirectories contain
configuration information for the respective printer
3. lpsched matches the printer type and file content type. It also identifies the destination printer for the print
client.
4. If necessary, lpsched filters the print request.
In the following example, we will create a printer class called “complab” for a college computer lab with two printers.
Notice that the complab class is created automatically when printer1 is added to it.
Page 38 of 46
Solaris 9 System Administration Part 1
Now that both printers are added to the class, students may submit print requests as follows:
# lp –d complab myfile
# lpadmin -x printer1
This removes the configuration information from the /etc/lp/printers directory on the client.
Page 39 of 46
Solaris 9 System Administration Part 1
# reject printer1
# disable printer1
# lpadmin -x printer1
This removes the configuration information from the /etc/lp/printers directory on the print server.
# /usr/lib/lpshut
# /usr/lib/lpsched
Page 40 of 46
Solaris 9 System Administration Part 1
# /usr/bin/enable printer1
printer “printer1” now enabled
The “-W” switch causes the command to wait to until the current print request is completed. Conversely, if the “–c”
switch had been used, the current print request would have been cancelled.
2. Use the reject command to prevent additional print requests from being accepted.
lpstat –o
<Output Omitted>
# lpstat –a printer2
printer printer2 accepting requests since Sun May 5
Page 41 of 46
Solaris 9 System Administration Part 1
# accept printer1
destination “printer1” now accepting requests
The CDE Process Manager – A graphical tool that can be launched from the CDE workspace or from the
command line by typing /usr/dt/bin/sdtprocess
The ps command – The Process Status (ps) command is the most commonly used method
The prstat command – This is a new and improved command that was included with Solaris 8
The at and batch commands are used to schedule a one-time execution at a certain time. For recurring execution of
commands, a crontab file is used. These files are located at /var/spool/cron/crontabs
Page 42 of 46
Solaris 9 System Administration Part 1
Media Capacity
4 mm 24 GB
8 mm Cartridge Tape 40 GB
0 – This is the logical number of the tape. For example, the first tape could be named /dev/rmt/0 and so on
h – This part of the name indicates the tape density. For example:
l – Low Density
m – Medium Density
h – High Density
c – Compressed
u – Ultra Compressed
n – This part of the name indicates whether a tape is to be rewound when the operation is completed. If there is
an “n” in the name, this indicates that the tape is not to be rewound
Page 43 of 46
Solaris 9 System Administration Part 1
Going back to our example, we can see that the tape in question is the first logical tape of high density and is not to be
rewound.
Backup Types
There are only two types of backups in the Solaris Operating Environment.
Incremental – A backup of new and modified files since the previous backup
The /usr/bin/ufsdump command can be used to perform a backup at a level 0 through 9 and also to verify the contents
of the backup. A level 0 backup is a full backup. Levels 1 through 9 are incremental. The difference between any given
level and another is that it will perform a backup of all files that have been created or changed since the last lower level
backup. The command can also be used to update the /etc/dumpdates file which contains the file system, date and
dump level information.
Usually the crontab file is used to schedule nightly, weekly and monthly backups. The flexibility of the ufsdump and
crontab offer endless possibilities and allow system administrators to create backup strategies specific to their needs.
Be sure to read the man pages for this command and understand the various options and usage.
Page 44 of 46
Solaris 9 System Administration Part 1
ok boot cdrom –s
# newfs /dev/rdsk/c0t0d0s0
# mount /dev/dsk/c0t0d0s0 /x
# cd /x
4. Restore the root file system from backup. Note that we need to always start a restore from the tape that
contains the level 0 backup. Here let’s assume that it resides on tape 0.
# ufsrestore rf /dev/rmt/0
# rm restoresymtable
# cd /usr/platform/`uname -m`/lib/fs/ufs
# installboot bootblk /dev/rdsk/c0t0d0s0
# cd /
# umount /x
Page 45 of 46
Solaris 9 System Administration Part 1
# fsck /dev/rdsk/c0t0d0s0
# init 6
10. Perform a full back up of the new file system. This is necessary because the ufsrestore command changes the
position of the files and re-allocates inodes.
Step 6 is important when restoring the root partition. It can be skipped when restoring the /usr and /var file systems. In
order to restore regular file systems, steps 1, 6 and 9 can be skipped.
For example, if we want to find out how many bytes it would take to perform a full backup of the / partition:
# ufsdump 0S /
1249763328
Or, if we want to find out the number of bytes required to perform a level 3 back up the /export/home file system:
# ufsdump 3S /export/home
122871808
Now we can take the number of bytes reported back and divide it by the capacity of the tape. This will
give us the number of tapes required to perform the backup.
Page 46 of 46