squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Day 5
Day 6
Day 7
Day 8
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

solaris8 - Day 1

Admin

Texas state survey and Roll.

Goals

In this session you will:
  • get an overview of administering a standalone system
  • add and configure users
  • boot sequence
  • boot PROM

Introductory notes

  • Solaris 8 = Solaris 2.8 = SunOS 5.8
  • Solaris from the BSD side of the code fork, with a dose of System V R4 introduced with Solaris 2 (binary incompatibility)
  • Important changes
    • registry-type accounting of software installed via package management tools.
    • unified control of special devices through devfsadm
    • CDE 1.4
    • Solaris Management Console 2.0
    • perl 5.x part of standard distribution
    • USB on intel (not on Sparc boxes)
    • distribution of GPL software
    • ability to unmount "busy" filesystems
    • UDF FS (found in some packet writing schemes)
    • better multi-CPU management
    • RBAC (role based access control), cf sudo/su

admin for a standalone system

  • pro
    • your box will behave as you direct it
    • the load largely will be your own; less contention for resources
  • con
    • required to be at the box; no telnet/ssh
    • inability to reference work from internet or other hosts (patches, software, docs)

finding your feet

  • what kind of box is it? Box? Monitor? KB? pointing device?
  • what is the physical environment?
  • who else has the root password?
  • what user accounts are on the box? what are they used for?
  • set up a normal user account for yourself (become root only when necessary)
    untested useradd wrapper
  • who is on the box (w, who, whodo) and what are they doing
  • when were they last on the box? last, logins -x -l -p
  • what is the shell for root? What is the window manager?
  • become the only root: change the passwd
  • now log in as the normal user
  • what is the default shell for your normal account?
  • how much diskspace does the box have? df note that older versions of Solaris may use 512kb block sizes
  • how are the discs mounted mount : record this info!
  • what kind of processor and memory? FIXME dmesg
  • what is my PATH? what is in it?
  • do I have a compiler? Sun or GCC or other?
  • is /etc/passwd shadowed
  • what services/apps are currently running on the box?
  • what editors do I have at my disposal?
  • what is in /var/adm, loginlog,
  • what is in /etc/default
  • what is in /etc/skel

add and configure users

  • Before we start:
    • home directories
    • quotas
    • login shells (including restricted logins, login straight to apps, etc)
    • workgroups
    • skelfiles: .profile, .login to provide umask, etc.
    • OS limitations - 8char usernames w/no funky chars
  • temporarily suspending an account
  • permanently removing an account
  • reuse of uid/gid

boot process

  • The boot prom contains the bootstrapping instructions (OpenBoot) on Solaris hardware. There is none on x86 architecture, so you can't stop-a (p. 17) To reconfigure, use boot -r, touch /reconfigure, or run devfsadm.
  • the strap.com program is run from whichever bootable device is available: floppy, hd, cdrom, network (if applicable).
  • strap.com loads boot.bin
  • config assistant and /etc/bootrc (b rvas or i for interactive
  • kernel loads (genunix, unix) with associated modules running, along with the / filesystem. Small static core; most are linked at boot time or on demand
  • kernel mounts other filesystems, and starts the init process which will bring the box up according to the init (rc) scripts. The default state is called "initdefault"; usually multiuser.
  • you can see boot messages later with dmesg

runlevels and rc scripts

  • 8/7 runlevels; see p. 23 In short:
    • 2,3 normal
    • S administration including disk maintenance (users could log in if 1)
    • 6 reboot
    • 0 power down
  • /sbin/rcn calls scripts in /etc/rcn.d which are hard links to /etc/init.d
  • scripts executed in order by filename (ASCII sort order): s=start, k=kill

admin invocation of rc scripts

  • no reboot necessary! just run the script the same way the boot process does
  • pgrep new to Solaris 8: p. 338-9
  • scripts usually take start/stop argument
  • you can make your own scripts: p31
  • disable a script by lowercase or otherwise munging the scriptname

shutdown/reboot

pp. 36-39

Who is on the system now and what are they doing?

  • automatic shutdown via watchdog
  • shutdown via admin command:
  • shutdown is the default; elegant with delay, warning to users, takes system to a maintenance state. p36. Note the -g (grace period) and -i (init state) switches
  • use reboot to cycle the box back to the default mode
  • use poweroff (aka init 5 to power the box down
  • explicit init runlevel

adding new users

think first; work later. Frugal Gourmet say: before you pick up something hot, think about where the item will go.

  • admintool
  • commandline: useradd userdel usermod groupadd groupmod groupdel
  • skelfiles (/etc/skel/.*) v. system defaults (/etc/(profile|.*)) p.176
  • picking a username p. 163

    official usernames are better than personal usernames as far as the admin's workload is concerned

  • user/gids: ranges for boxen
  • homedir (possibly in /export)

deleting users

modifying users

Avoid: changing usernames and homedirs whenever possible.

Homework

  • solaris filesystems, real and virtual: pp 187, 190-94.
  • backup: 421-39 (skim!)
  • software management (no reading)


    http://www.mousetrap.net/syllabus/solaris8/day1.html
    $Id: day1.orb,v 1.13 2002/10/23 22:23:14 mouse Exp $


© 1994-2002 jason carr.
distributed under the terms of the GNU Free Documentation License.

jason carr

Reminders

  • Classroom temperature can be wildly variable. Dress lightly and bring layers.
  • your username is based on the class title and the last two digits of your workstation's hostname.
  • remember to take your work with you.