Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

sam(1M)

NAME

sam − system administration manager

SYNOPSIS

/usr/bin/sam

Remarks: At Release 9.0,

SAM has been tuned to run in the Motif environment (though it also runs in a text terminal environment).  To run SAM using Motif windows:

1.  Be sure Motif is loaded on the system on which SAM is being used (system must have X11R5-PRG and X11R5-SHLIBS filesets installed). 

2.  Set the DISPLAY environment variable to match the system name (e.g., DISPLAY=system:0.0 ). 

DESCRIPTION

The sam command starts a menu-driven program that makes it easy to perform system administration tasks with only limited specialized knowledge of HP-UX.  SAM is a self-guided tool, and context-sensitive help is available at any point by pressing the f1 function key.  Status messages show whether or not a task succeeded, and what errors occurred, if any. 

To conveniently administer one or more remote systems from a local system, run SAM on the remote system with control from the local keyboard and display. 

All actions by SAM are logged into the local system file /usr/sam/log/samlog or /usr/sam/log/hostname, depending on the environment.  The [Options...] button in the SAM Control Box allows run-time control of logging. 

SAM performs system administration tasks in the following areas:

User and Group Account Management:

• Add users, remove users, view/modify the account information, or change the password of any user on the system.  You can “customize” the tasks of adding and removing users by specifying steps to be performed before and/or after SAM does its processing for the task.  The Task Customization action items in SAM Users and Groups leads you through this capability.  See “Customizing SAM Tasks” below for more information. 

• Deactivate users (preventing them from logging in, but leaving their files and directories intact).  These users can also be reactivated (allowing them to log in to your system again). 

• Add groups, remove groups, and view or modify group membership. 

Disk and File Systems Management:

• Add, move into the LVM (Logical Volume Manager), remove, or change address of hard disk drive. 

• Add, modify, convert to long file names, or remove a local file system on a hard disk or on a logical volume. 

• Remote (NFS) file systems configuration, including:

− Add, modify, or remove remote (NFS) file systems. 

− Allow or disallow access by remote systems to local file systems. 

− Modify RPC (Remote Procedure Call) services’ security. 

• Add, remove, or modify a device swap on hard disk or logical volume. 

• Add, mount, umount, or create a file system on an optical disk. 

• Examine, create, extend, or reduce a volume group pool of disks. 

• Create, extend or change number of mirrored copies of a logical volume and associated file sytem. 

• Remove or reduce a logical volume. 

• Split or merge mirrored copies of a logical volume. 

Peripheral Devices Management:

• Add, modify, or remove the configuration of printers and plotters. 

• Administer the LP Spooler. 

• Add, modify, or remove the configuration of hard disk drives and CD-ROM drives. 

• Add, remove, or modify device swap. 

• Add file system swap. 

• Add or remove terminals and modems. 

• Add or remove tape drives. 

• Add or remove hardware interface cards and HP-IB instruments (Series 800 only). 

• View current configuration of peripherals and disk space information. 

Backup and Recovery:

• Interactively back up files to a valid backup device (cartridge tape, cartridge tape autochanger, magnetic tape, DAT, magneto-optical disk or magneto-optical disk autochanger).  The SAM interface is suspended so that you can read and/or respond to the interactive messages produced by fbackup (see fbackup(1M)).

• Recover files online from a valid backup device.  The SAM interface is suspended so that you can read/respond to the interactive messages produced by frecover (see frecover(1M)).

• Add to, delete from, or view the automated backup schedule. 

• Obtain a list of files from a backup tape. 

• View various backup and recovery log files. 

Process Management:

• Kill, stop or continue processes. 

• Change the nice priority of processes. 

• View the current status of processes. 

• Schedule periodic tasks via cron. 

• View current periodic (cron) tasks. 

• Run performance monitors. 

Routine Tasks: Shut down the system. 

• View and remove large files.  Specify size and time-since-accessed of large files to display or remove. 

• View and remove core files. 

• View and trim ASCII or non- ASCII log files.  Add or remove files from the list of files to monitor.  Set recommended size for trimming. 

HP-UX Cluster Configuration (Series 300/700 only):

• Create an HP-UX cluster by setting up the cluster server (kernel, dfile, data files, and CDF s) and adding cluster clients. 

• Add or remove cluster clients.  You can customize the tasks of adding and removing cluster clients by specifying steps to be performed before and/or after SAM does its processing for the task.  The Configure Task Customization action leads you through this capability.  See “Customizing SAM Tasks” below for more information. 

• Modify swap server system for cluster clients.  Any client with a local swap disk can be configured as a swap server for other clients at the time the disk is added.  Later, other clients can be set to swap to the swap serving client. 

Kernel and Device Configuration:

• Change the configuration for I/O device drivers. 

• Modify operating system parameters. 

• Modify swap configuration in the kernel. 

• Modify dump device configuration in the kernel. 

• Add or remove optional subsystems such as NFS, LAN, NS, CD-ROM, etc. 

• Generate a new kernel. 

• Change your system console device (Series 700/800 only). 

Networks/Communications:

• Configure the LAN card or cards and the services they support:

− ARPA services. 

− Network Services (NS). 

− Network File System (NFS). 

• Configure X.25 card or cards and PAD (Packet Assembler/Disassembler) services. 

• Add, limit, or remove the ability of your system to communicate with remote systems via UUCP. 

Auditing and Security (Trusted Systems):

• Turn the Auditing system on or off. 

• Set the parameters for the Audit Logs and Size Monitor. 

• View all or selected parts of the audit log(s). 

• Modify (or view) which users, events, and/or system calls get audited. 

• Convert your system to a Trusted System. 

Networking Services and Trusted Systems features are not present on all system configurations, so these areas are not always accessible through SAM. 

File System Protection When Removing Users

When removing users or files from a system, there is always the unfortunate likelihood that the wrong user may be removed or that files belonging to a user who is removed are deleted inadvertently during the removal process.  For example, user bin is the owner of (from the operating system’s perspective) the majority of the executable commands on the system.  Removing this user would obviously be disastrous.  On the other hand, suppose user joe owns all of the files comprising the test suite for a project.  It may be appropriate to remove joe, but the test suite should be left intact and assigned to a new owner.  SAM provides two features to help protect against inadvertent removal of users or files when removing users:

• When prompting for the name of a user to remove from the system, SAM checks the name given against a list of names specified in the file /usr/sam/config/rmuser.excl.  If the name matches one within the file, SAM does not remove the user. 

• When SAM removes a user, all files (or a subset thereof) for that user are also removed, unless the ownership is given to another user.  Before removing a file belonging to the user, SAM checks to see if the file resides in a path that has been excluded from removal.  SAM uses the file /usr/sam/config/rmfiles.excl to determine which paths have been excluded from removal.  So, for example, if the path /users/joe/test is named in the file, SAM will not remove any files residing beneath that directory.  SAM logs a list of all files it removes in the file /tmp/sam_remove.log. 

• SAM does not remove or reassign any files if the user being removed has the same user ID (uid) as another user on the system. 

Files /usr/sam/config/rmuser.excl and /usr/sam/config/rmfiles.excl can be edited to contain users and directories that you want to exclude from removal by SAM. 

Customizing SAM Tasks

You can customize the following SAM tasks:

• Add a New User Account to the System

• Remove a User Account from the System

• Add a Cluster Client

• Remove a Cluster Client

For each of these tasks, you can specify steps you want performed before and/or after SAM does its processing for the task.  Before SAM performs one of the tasks, it checks to see if a pre-task step (executable file) was defined.  If so, SAM invokes the executable, passes it a set of parameters (see below), and waits for its completion.  You can halt SAM’s processing of a task by exiting from your executable with a non-zero value (for example if an error occurs during execution of your executable). 

After SAM has finished processing, it checks for a post-task step, performing the same type of actions as for the pre-task step. 

The executable file must have these characteristics:

• Must be owned by root. 

• Must be executable only by root, and if writable, only by root. 

• Must reside in a directory path where all the directories are writable only by owner. 

• The full pathname of the executable file must be given in the SAM data entry form. 

The same parameters are passed from SAM to your program for both the pre-task and post-task steps.  Here are the parameters passed for each task:

• Add a New User Account to the System:

-l login_name

-v user_id

-h home_directory

-g group

-s shell

-p password

-R real_name

-L office_location

-H home_phone

-O office_phone

The file /usr/sam/config/ct_adduser.ex contains an example of how to process these parameters. 

• Remove a User Account From the System

There can be one of three possible parameters, depending on the option selected in the SAM data entry form.  The parameter can be one of these three:

-f user_name option supplied when all of user_name’s files are being removed.

-h user_name option supplied when user_name’s home directory and files below it are being removed.

-n new_owner user_name option supplied when all of user_name’s files are being assigned to new_owner.

The file /usr/sam/config/ct_rmuser.ex contains an example of how to process these parameters. 

• Add a Cluster Client

When adding multiple clients, the customized task is invoked once for each client.  If any pre-task command fails (returns non-zero), the corresponding client is not added. 

The parameters are:

-h client_nodename Name of the cluster client being added. 

-m machine_type HP68020 for Series 300/400 or HP-PA for Series 700. 

-i internet_address Unique network address for the cluster client, in the form ddd.ddd.ddd. . 

-a link_level_address 12-character hardware address associated with the LAN card in the cluster client. 

-n number_csps Number of cluster server processes allowed for the cluster client.  Normally set to a default value of 1 for new clients. 

The options -c cluster_type, -l lan_card, and -f template_file supported in previous releases are no longer supported. 

The file /usr/sam/config/ct_addnode.ex contains an example of how to process these parameters.  The task customize command is run with standard output and standard error sent to the cluster log file, /tmp/cluster.log. 

• Remove a Cluster Client

When removing multiple clients, the customized task is invoked once for each client.  If any pre-task command fails (returns non-zero), the corresponding client is not removed.  The format of the parameter string for this task is the same as for adding a cluster client, with the following additions:

-d cnode_id Cnode ID of the client to remove. 

-s swap_id Cnode ID of the swap server system for the client to remove. 

-r remove_flag One of the values REMOVE_FILES or REMOVE_KEEP indicating whether the removed client’s CDF elements will be removed or kept. 

The options -c cluster_type, -l lan_card, -f template_file, and -q remove_files_yes_no supported in previous releases are no longer supported. 

File /usr/sam/config/ct_rmnode.ex contains an example of how to process these parameters.  The task customize command is run with standard output and standard error sent to the cluster log file, /tmp/cluster.log. 

Adding New Functionality to SAM

You can easily add stand-alone programs and scripts to SAM.  Under main menu item Other Utilities, you can create your own hierarchy of menus to access executable programs.  SAM is suspended while the executable program is running.  When it finishes, the SAM interface is restored.  You can also write your own help screen for each menu item you create.  To add functionality to SAM, create a text file with the following format and place it in directory /usr/sam/custom with a .ou extension on the file name (for example, /usr/sam/custom/my_utils.ou):

# Lines which start with a ’#’ are comments
label "menu name" {
   label "submenu name" {
      label "item name"
         command "executable program"
         help "optional help file for item"
      label "item name"
         command "executable program"
         help "optional help file for item"
   } help "optional help file for submenu"
   label "submenu name" {
      label "item name"
         command "executable program"
         help "optional help file for item"
      label "item name"
         command "executable program"
         help "optional help file for item"
   } help "optional help file for submenu"
} help "optional help file for menu name"

A very simple Other Utilities file would be:

label "Edit the message of the day"
   command "vi /etc/motd"
   help "/usr/sam/custom/somehelp.hlp"

An example of how to add menu items and help screens is located under the Other Utilities main menu item. 

DEPENDENCIES

SAM runs in an X Windows environment as well as on the following kinds of terminals or terminal emulators:

• HP-compatible terminal with programmable function keys and on-screen display of function key labels. 

• VT -100

Depending on what other applications are running concurrently with SAM, more swap space may be required.  SAM requires the following amounts of internal memory:

8 Mbytes if using terminal based version of SAM. 

16 Mbytes if using Motif Windows version of SAM. 

For more detailed information about how to use SAM on a terminal, see the first chapter of the System Administration Tasks manual. 

AUTHOR

sam was developed by HP. 

FILES

/usr/sam/WORKSPACE directory for working space, including lock files (if a SAM session dies, it may leave behind a spurious lock file). 

/usr/sam/bin directory containing executable files. 

/usr/sam/lib directory for internal configuration files. 

/usr/sam/log directory containing log files. 

/usr/sam/help/$LANG directory containing SAM language specific, online help files. 

/usr/sam/custom directory where users can put their Other Utilities files ( .ou extensions) which will automatically be read by SAM at startup. 

/usr/sam/config directory containing configuration files. 

/usr/sam/config/rmuser.excl
file containing a list of users that are excluded from removal by SAM. 

/usr/sam/config/rmfiles.excl
file containing a list of files and directories that are excluded from removal by SAM. 

SEE ALSO

Related manuals:

System Administration Tasks
Installing and Administering ARPA Services
Installing and Administering LAN/9000
Installing and Administering NFS Services
Installing and Administering Network Services
Installing and Administering X.25/9000
How HP-UX Works: Concepts for the System Administrator

 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026