Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sam(1M) — HP-UX 8.05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

sam(1M)

NAME

sam − system administration manager

SYNOPSIS

/usr/bin/sam

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.  Status messages tell you whether or not a task succeeded, and what errors, if any, occurred. 

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" main menu item in SAM 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. 

File Systems Management:

• Add or modify local (HFS, CD-ROM) file systems. 

• Convert local file systems to long file names. 

• Remote (NFS) file systems configuration, including:

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

− Allow/disallow remote systems access to local file systems. 

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

• Add, remove, or change the address of a hard disk drive. 

• Add, remove, or modify device swap. 

• Add file system swap. 

• View current information about file systems and disk space. 

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 terminals and modems. 

• Add or remove tape drives, graphics subsystems, hardware interface cards, and HP-IB instruments (Series 700/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, magnetic tape, DAT, or autochanger).  The SAM interface is suspended so that you can read/respond to the interactive messages produced by 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(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. 

HP-UX Cluster Configuration:

• Create an HP-UX cluster by setting up the cluster server 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 Task Customization main menu item in SAM leads you through this capability.  See "Customizing SAM Tasks" below for more information. 

• Designate swap location for cluster clients.  Any client with a local swap disk can be configured as a swap server when the disk is added. 

Kernel and Device Configuration:

• Change the configuration for I/O device drivers. 

• Modify operating system parameters. 

• Modify swap configuration in the kernel. 

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

• Generate a new kernel. 

• Configure disk mirroring (Series 800 only). 

• 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 the services they support:

− ARPA services. 

− Network Services (NS). 

− 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. 

You can edit the files /usr/sam/config/rmuser.excl and /usr/sam/config/rmfiles.excl 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) has been 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 value of 5 (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 writable and executable 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 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 form.  The parameter can be one of these three:

−f user_name Remove all of user_name’s files.

−h user_name Remove user_name’s home directory and files below it.

−n new_owner user_name Assign all of user_name’s files to new_owner.

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

• Add a Cluster Client

If there are multiple clients being added, separate invocations of the customized task will be made, passing the list of parameters for each.  The parameters are:

−h client_nodename Name of the cluster client being added. 

−i internet_address Unique network address for the cluster client. 

−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.  A value greater than 0 implies a local disk. 

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

−c cluster_type Either Homogeneous Cluster or Mixed Cluster . 

−l lan_card Logical number of the LAN card used for naming the device file for the cluster client.  For example, if lan_card is 3, the device file for the client would be /dev/lan3. 

−f template_file Template for building the client kernel (used on Series 700/800 only); Series 300/400 uses a null value. 

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

• Remove a Cluster Client

If multiple clients are being removed, separate invocations of the customized task are made, passing the list of parameters for each.  The format of the parameter string for this task is the same as for adding a cluster client, with the following addition:

−q remove_files_yes_no The remove_files_yes_no field contains either yes or no to indicate whether or not to remove all client-specific elements from CDF’s. 

File /usr/sam/config/ct_rmnode.ex contains an example of how to process these parameters. 

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 (up to five levels deep) to access executable programs.  SAM is suspended while the executable program is running.  When it finishes, the SAM menu is restored.  You can also write your own help screen for each menu item you create.  To add functionality to SAM, edit the file /usr/sam/config/other_utils according to the following format:

"menu name" {
"submenu name" {
"item name" "executable program" \
"optional help file for item" #optional comments
"item name" "executable program" \
"optional help file for item" #optional comments
} "optional help file for submenu"
"submenu name" {
"item name" "executable program" \
"optional help file for item" #optional comments
"item name" "executable program" \
"optional help file for item" #optional comments
} "optional help file for submenu"
} "optional help file for menu name"

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

DEPENDENCIES

SAM requires one of the following kinds of terminals or terminal emulators:

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

• Wyse-30 terminal. 

• VT-100 terminal (function keys are obtained by pressing the CTRL and F keys simultaneously, then the appropriate key in the range 1 through 8. 

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/backup directory containing backup and recover scripts and log files. 

/usr/sam/bin directory containing executable files. 

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

/usr/sam/log directory containing log files. 

/usr/sam/other_help directory for help screen files used under the Other Utilities menu. 

/usr/sam/config directory containing administrator-modifiable configuration files. 

/usr/sam/config/other_utils file that can be modified to add “hooks” to programs outside of SAM. 

/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 8.05: June 1991

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