C H A P T E R  4

Additional SMS 1.6 Software Procedures

This chapter contains additional procedures that you might want to perform while using or updating the SMS 1.6 software. The topics covered in this chapter include:


Adding Users to SMS

The SMS security model uses group membership to provide users with the authority to perform various system management tasks. The level and type of system management available depends on a user's group membership. For more information, refer to Chapter 2, "SMS Security" in the System Management Services (SMS) 1.6 Administrator Guide.



Note - Adding users using smsconfig must be performed on both the main and spare SCs once software installation and network configuration are completed.



The SMS user group IDs are created during initial installation. TABLE 4-1 lists the user groups that are set up for you.


TABLE 4-1 User Group IDs Created During Installation

User Group ID

User Group Description

platadmn

Platform Administrator Group

platsvc

Platform Service Group

platoper

Platform Operator Group

dmnaadmn

Domain A Administrator Group

dmnbadmn

Domain B Administrator Group

dmncadmn

Domain C Administrator Group

dmndadmn

Domain D Administrator Group

dmneadmn

Domain E Administrator Group

dmnfadmn

Domain F Administrator Group

dmngadmn

Domain G Administrator Group

dmnhadmn

Domain H Administrator Group

dmniadmn

Domain I Administrator Group

dmnjadmn

Domain J Administrator Group

dmnkadmn

Domain K Administrator Group

dmnladmn

Domain L Administrator Group

dmnmadmn

Domain M Administrator Group

dmnnadmn

Domain N Administrator Group

dmnoadmn

Domain O Administrator Group

dmnpadmn

Domain P Administrator Group

dmnqadmn

Domain Q Administrator Group

dmnradmn

Domain R Administrator Group

dmnarcfg

Domain A Configuration Group

dmnbrcfg

Domain B Configuration Group

dmncrcfg

Domain C Configuration Group

dmndrcfg

Domain D Configuration Group

dmnercfg

Domain E Configuration Group

dmnfrcfg

Domain F Configuration Group

dmngrcfg

Domain G Configuration Group

dmnhrcfg

Domain H Configuration Group

dmnircfg

Domain I Configuration Group

dmnjrcfg

Domain J Configuration Group

dmnkrcfg

Domain K Configuration Group

dmnlrcfg

Domain L Configuration Group

dmnmrcfg

Domain M Configuration Group

dmnnrcfg

Domain N Configuration Group

dmnorcfg

Domain O Configuration Group

dmnprcfg

Domain P Configuration Group

dmnqrcfg

Domain Q Configuration Group

dmnrrcfg

Domain R Configuration Group



procedure icon  To Add Users to SMS Groups and Configure Directory Access

SMS provides the ability to add users to SMS groups and refine user access to directories in the domains. This functionality protects domain integrity and system security.

1. Log in as superuser.

2. Type the following command for each user you want to add.


sc0:# /opt/SUNWSMS/bin/smsconfig -a -u username -G groupname domain_id|platform

where:

For example, to add a user to the dmnaadmn group with access to domain A directories, type the following.


sc0: # /opt/SUNWSMS/bin/smsconfig -a -u fdjones -G admn a 
fdjones has been added to the dmnaadmn group
All privileges to domain a have been applied.



Note - Do not manually add or remove users from SMS groups in the /etc/group file. This can limit or deny access to users.



3. To list SMS groups and administrative privileges, use the following command.


sc0: # /opt/SUNWSMS/bin/smsconfig -l domain_id|platform

For example, to display all users with platform privileges, type the following.


sc0: # /opt/SUNWSMS/bin/smsconfig -l platform
fdjones
jtd

4. Type the following command for each user you want to remove.


sc0:#/opt/SUNWSMS/bin/smsconfig -r -u username -G groupname domain_id|platform

where:

For example, to remove fdjones from the dmnbadmn group, type the following.


sc0: # /opt/SUNWSMS/bin/smsconfig -r -u fdjones -G admn B 
fdjones has been removed from the dmnbadmn group.
All access to domain B is now denied.



Note - Do not manually add or remove users from SMS groups in the /etc/group file. This can limit or deny access to users.




Installing SMS Patches

SMS patches are available at http://sunsolve.sun.com.

Before you install patches for your SMS software, follow these guidelines and notify the affected administrators if necessary.

Complete any domain, board, or configuration changes before you begin patch installation.

Read all patch instructions (included with the patch) carefully before attempting to install a patch. Instructions in the patch procedure could preempt these instructions.

This example assumes that the main SC is sc0 and the spare SC is sc1.


procedure icon  To Install a Patch on an SC

1. Log in to the main SC (sc0) with platform administrator privileges.

2. Turn failover off. Type the following.


sc0:sms-user:> /opt/SUNWSMS/bin/setfailover off

3. Stop the SMS processes on the main SC.


sc0:# /etc/init.d/sms stop


4. Stop the SMS process on the spare SC.


sc1:# /etc/init.d/sms stop


5. Install the patch on both SCs.

6. Start the SMS processes on the main SC first.


sc0:# /etc/init.d/sms start

Wait for all processes to start before proceeding to the next step. Use the showenvironment command to verify that all SMS processes have started.

7. Start the SMS processes on the spare SC (sc1).


sc1:# /etc/init.d/sms start

8. Enable failover on the main SC (sc0).


sc0:sms-user:> /opt/SUNWSMS/bin/setfailover on


Configuring an SC as an NTP Client

To keep the most accurate time of day on Sun Fire high-end systems, configure both system controllers and each bootable domain in the platform as Network Time Protocol (NTP) clients of the same NTP servers.


procedure icon  To Configure an SC as an NTP Client

Before proceeding, make sure that the platform has the most up-to-date patches, and that the latest recommended patch cluster is installed on the domains and system controllers.

The default NTP configuration file is /etc/inet/ntp.conf. It must contain a minimum of three NTP time servers with independent time sources. (For a list of public NTP time servers, refer to http://www.ntp.org.)

1. Insert the names of three NTP servers into the NTP configuration file of each SC and bootable domain.

Insert the following lines, replacing ntp_server with the actual name of the NTP server.


server ntp_server prefer
server ntp_server2 
server ntp_server3 

The server name followed by the prefer argument is the primary NTP server.

2. Add the name of the drift file.

The drift file records the frequency offset of the local clock oscillator. It is read at startup to set the initial frequency offset. Use the driftfile argument, followed by the name of the file.


driftfile filename

3. Add instructions for generating statistics.

These instructions consist of one line for a statistics path followed by a line for each type of statistics that is to be collected.


statsdir /var/ntp/ntpstats
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable

The first line indicates the path in which the statistics files are saved. The following lines each indicate the type of statistic (peer statistics, loop filter statistics, and clock driver statistics).

For more information about the available options, consult the xntp(1M) man page.


Stopping and Starting SMS

The following procedure describes how to manually stop and start SMS.


procedure icon  To Manually Stop and Restart SMS

1. Log in to the SC as a user with platform administrator privileges.

You must have platform administrator privileges to run the setfailover command.

2. Turn off failover.


sc0:sms-user:> /opt/SUNWSMS/bin/setfailover off

3. Log out as a platform administrator.

4. Log in to the SC as a user with superuser privileges.

You must have superuser privileges to perform the following tasks.

5. Use the /etc/init.d/sms script to stop SMS.


sc0:# /etc/init.d/sms stop

6. Use the /etc/init.d/sms script to restart SMS.


sc0:# /etc/init.d/sms start

7. Log out as superuser.

8. Log in to the SC as a user with platform administrator privileges.

9. Turn on failover.


sc0:sms-user:> /opt/SUNWSMS/bin/setfailover on

10. Type the following command.


sc0:sms-user:> /opt/SUNWSMS/bin/showenvironment

11. Wait until showenvironment finishes displaying all board status.

At this point, you can log out and begin using SMS.


Changing the ssh Escape Character

The default Secure Shell (ssh) escape character is ~ (tilde). The SMS console uses the same character for escape sequences. This means that you must use a different escape character for ssh.

There are three ways to use a different escape character for ssh:



Note - You can use any alphanumeric character as an escape character, but it is best to choose one that does not conflict with other commands and which cannot be confused with system or command prompts.



The following sections explain how to change the ssh escape character.


procedure icon  To Permanently Change the ssh Escape Character

1. Do one of the following:

single-step bulletIf you already have a .ssh/config file in your home directory, open that in your text editor.

single-step bulletIf you do not already have a .ssh/config file in your home directory, use your text editor to create one.

2. Type the following text into the file.


EscapeChar ^

In this example, the caret (^) is the new escape character.

3. Save the file as .ssh/config.

The next time you start ssh, the program will recognize ^ as the new escape character. This change remains permanent unless you delete the .ssh/config file, or specify another escape character.


procedure icon  To Change the Escape Character for a Single ssh Session

The ssh command contains a -e option that enables you to specify a different escape character for the duration of the ssh session. You can specify the new escape character when you log in to ssh. Once you exit ssh, the default escape character reverts to ~.

To change the escape character for a single session, follow these steps. In this example, the caret (^) character is the new escape character.

1. Log in to ssh from the system prompt, including the -e^ option as shown in the example.

You can use a different escape character in place of ^.


% ssh -e^ login-options

login-options stands for the other options you normally use when logging in using ssh, such as the remote host name, login name, and so on.



Note - Be sure to specify an escape character when you use the -e option. If you use the -e option without specifying an escape character, all escape characters are disabled for the duration of your ssh session.



2. When you have finished using ssh in this session, type the new escape character (^ in this example), followed by a period.


sc:# ^.
%

This exits ssh, and returns you to the local system prompt.


Using the Alternate Break Sequence

Since SMS 1.3, the default sequence to stop the system [Stop-A] has been changed to the following alternate: [Return] [~] [Control-B].

This was done to facilitate failover. The Solaris 8 OS introduced this new feature, which gives the system the ability to force a hanging system to halt when required without allowing random or spurious breaks to cause an unintentional stop.



Note - This default stop sequence works only with serial devices acting as consoles and not for systems with keyboards of their own. There must be an interval of more than 0.5 seconds between characters, and the entire string must be entered in less than 5 seconds.




procedure icon  To Enable the Alternate Break Sequence

1. Log in to the SC as superuser.

2. In the /etc/default/kbd file, uncomment the following line:

#KEYBOARD_ABORT=alternate

3. Reboot the SC.


Switching SMS Versions

SMS enables you to switch between versions of SMS using the smsversion script. The two versions must both be a minimum of SMS 1.5 and must both reside on the same version of the Solaris OS. This means that SMS 1.6 cannot switch to SMS versions earlier than 1.5. For SMS 1.6 on Solaris 9 OS, you can switch back to SMS 1.5. For SMS 1.6 software on Solaris 10 OS, you cannot switch back to SMS 1.5, because Solaris 10 OS supports only SMS 1.6. For more information about the smsversion command, refer to the System Management Services (SMS) 1.6 Administrator Guide.

Switching to other SMS versions from SMS 1.6 has security implications. SMS 1.6 uses a different security profile than previous versions of SMS. This profile automatically hardens the SCs when you run the smsinstall command. Since this hardening is not undone by the smsversion command, you must manually undo the hardening before switching to a version of SMS other than 1.6.

To switch to another SMS version from SMS 1.6, follow this sequence. These procedures are explained in detail later in this section.

1. Undo hardening manually (using the Solaris Security Toolkit).

2. Switch to another version of SMS (using the smsversion command).

3. Reharden manually (using the Solaris Security Toolkit).

4. Reboot the system.

The changes take effect after you reboot the system. If you do not remove the hardening manually, it remains in effect after the version switch, and this can impact SMS functionality.


procedure icon  To Manually Undo Hardening

You can use the Solaris Security Toolkit to administer any aspect of Solaris security on the system controllers. Refer to the Solaris Security Toolkit 4.2 Administrator Guide or the Solaris Security Toolkit 4.2 Reference Manual. Both the smsinstall and the smsupgrade scripts install the Solaris Security Toolkit in /opt/SUNWjass/.

To undo the hardening manually, perform the following procedure. You must perform the procedure twice: once on the main SC, and once on the spare SC.

1. Log in to the SC as superuser.

2. Type the following command at the sc prompt to undo the hardening.


sc:# /opt/SUNWjass/bin/jass-execute -u

The system prompts you to select a hardening operation (called a Solaris Security Toolkit run) to undo.


[xc8p13-sc0/] /opt/SUNWjass/bin/jass-execute -u
[NOTE] Executing driver, undo.driver
 
Please select a Solaris Security Toolkit run to restore through:
1. December 20, 2005 at 11:01:30 (/var/opt/SUNWjass/run/20041220110130)
Choice ('q' to exit)?  1
[NOTE] Restoring to previous run from /var/opt/SUNWjass/run/20041220110130
[...]

3. Type the number of the run you want to undo at the Choice (`q' to exit)? prompt.

4. Change to the OpenBoot PROM prompt.


sc:# shutdown -y -g0 -i0
...[system message]
ok

5. Reboot the SC.


ok boot -rv 

You can now switch to another version of SMS.


procedure icon  To Switch to a Different Version of SMS

Perform the following steps on the SC on which you want to switch to a different version of SMS. The two SMS software installations must be adjacent and co-resident on the SC.



Note - You must run the same versions of SMS on both SCs.



1. Log in to the spare SC as superuser.

2. Make certain your configuration is stable.

Being stable means the following commands should not be running: smsconfig, poweron, poweroff, setkeyswitch, cfgadm, rcfgadm, addtag, deletetag, addboard, moveboard, deleteboard, setbus, setdefaults, setobpparams, setupplatform, enablecomponent, or disablecomponent. If any of these commands are running, stop them before proceeding.

3. Use smsbackup to back up your SMS configuration.

See To Back Up the SMS Environment.

4. Deactivate failover by typing the following command at the SC superuser prompt.


sc:# /opt/SUNWSMS/bin/setfailover off

5. Stop SMS by typing the following command.


sc:# /etc/init.d/sms stop

6. Type the following command to run smsversion.


sc:# /opt/SUNWSMS/bin/smsversion version-number

where version-number is the SMS version to which you want to switch. The example in this procedure shows a switch from SMS 1.6 to SMS 1.5.

7. Follow the prompts shown on the screen.

The following example shows sample screen output.


sc:# /opt/SUNWSMS/bin/smsversion 1.5
smsversion: Active SMS version 1.6 >
You have requested SMS Version 1.5
 
Is this correct? [y,n] y
smsversion: Downgrading SMS from 1.6> to 1.5>.
smsversion: SMS version 1.5 installed
To move to a different version of SMS an archive of
critical files will be created. What is the name of
the directory or tape device where the archive will be
stored? [/var/tmp][Return]
 
smsversion: Backup configuration file created: /var/tmp/
sms_backup.1.5.cpio
smsversion: Switching to target version 1.5>.
smsversion: New Version 1.5> Active
smsversion: Active SMS version 1.5>
To restore the previous SMS configuration setting type: 
smsrestore /var/tmp/sms_backup.1.5.cpio

8. Type the following command to run smsrestore.


sc:# /opt/SUNWSMS/bin/smsrestore filename

where filename is the absolute path to the backup file that you created in Step 3 using smsbackup. The filename argument must contain the full path name for the file. This file can reside anywhere on the system, connected network, or tape device. If no filename is specified, you receive an error.

9. If the SMS version you selected in Step 6 requires changes to your network configuration, run smsconfig -m and then reboot the SC. Then log in to the SC as superuser again.

If you do not need to make network changes, proceed to the next step.

10. Stop SMS on the main SC (sc0).


sc0:# /etc/init.d/sms stop 

11. Type the following command to start SMS on the spare SC (sc1).


sc1:# /etc/init.d/sms start

12. Repeat Step 1 through Step 11 to switch SMS versions on the main SC (sc0).

13. Reactivate failover using the following command.


sc0:# /opt/SUNWSMS/bin/setfailover on

The version switching procedure is now complete. To restore security on the SC, you must reharden the SC.


procedure icon  To Reharden After the Version Switch

To reharden the SCs after the version switch is complete, perform the following procedure. You must perform the procedure twice: once on the main SC, and once on the spare SC.

1. Log in to the main SC as superuser.


sc0:# su -
password: superuser_passwd

2. Type the following command to reharden.


sc0:# /opt/SUNWjass/bin/jass-execute -q -d server-secure.driver

The system responds with the prompt Are you sure?

3. Type yes to proceed.

4. Change to the OpenBoot PROM prompt.


sc0:# shutdown -y -g0 -i0
...[system message]
ok

5. Reboot the main SC.


ok boot -rv 

The system rehardens the main SC.

6. Repeat the procedure on the spare SC (sc1).



Note - The -q (quiet) option suppresses verbose output from the system when you execute this command.




Checking the Solaris Security Toolkit Version

This section contains procedures that describe how to check the version of Solaris Security Toolkit. If the version of the Solaris Security Toolkit software is out of date, you can use the procedures in this section to uninstall the software.


procedure icon  To Determine Which Version of Solaris Security Toolkit Is Installed

1. Log in to the SC.

2. Type the pkginfo command with the -l option.


sc% pkginfo -l SUNWjass

The pkginfo command can be executed by the sms-svc user.

The -l option provides information about the package. Look for the VERSION field as in the following output example.


  PKGINST:  SUNWjass
     NAME:  Solaris Security Toolkit
 CATEGORY:  Application
     ARCH:  Solaris
  VERSION:  4.2
  BASEDIR:  /opt/SUNWjass
   VENDOR:  Sun Microsystems, Inc.
     DESC:  The Solaris Security Toolkit is a collection of tools and scripts used to automate the security hardening and verification of a system running the Solaris OS.
   PSTAMP:  on81-dhpg20041018104950
 INSTDATE:  Nov 08 2005 12:29
  HOTLINE:  Please contact your Sun service representative.
   STATUS:  completely installed
    FILES:      385 installed pathnames
                 33 directories
                 10 executables
               2809 blocks used (approx)

If the Solaris Security Toolkit has not been installed, pkginfo returns a message similar to the following.


ERROR: information for "SUNWjass" was not found


procedure icon  To Remove an Incompatible Version of the Solaris Security Toolkit

The SMS 1.6 version of the smsinstall script installs Solaris Security Toolkit 4.2 only if no previous versions are already installed. If you have modified any files in the Solaris Security Toolkit that you want to preserve, save them before following these steps. If you have added configuration files according to the instructions in the Solaris Security Toolkit documentation, you do not need to save them. They will be preserved.

1. Log in to the SC.

2. Use the pkgrm command to remove the Solaris Security Toolkit package.


sc% pkgrm SUNWjass

A message similar to this one is displayed for each package.


The following package is currently installed:
  SUNWjass        Solaris Security Toolkit
                  (Solaris) 4.2
 
Do you want to remove this package? 

3. To remove each package, type y for Yes.

Here is an example. The message varies by package.


Do you want to remove this package? y
 
## Removing installed package instance <SUNWjass>
## Verifying package dependencies.
## Processing package information.
/opt/SUNWjass/sysidcfg
/opt/SUNWjass/rules.SAMPLE
/opt/SUNWjass/nomatch.beg
/opt/SUNWjass/man/windex
/opt/SUNWjass/man/sman7/server-secure.driver.7
 
[...] 


Manually Backing Up and Restoring the SMS 1.6 Environment

The procedure in this section describes how to manually back up and restore SMS 1.6 on the SCs.


procedure icon  To Back Up the SMS Environment

Do the following tasks to back up and restore SMS 1.6 on the SCs.

1. Log in to the SC as superuser.

2. Disable failover by typing the following command.


sc:sms-user:> /opt/SUNWSMS/bin/setfailover off 

3. Stop SMS.


sc:# /etc/init.d/sms stop 

4. Back up the SMS environment.

Run smsbackup or have the latest copy of the smsbackup file (sms_backup.X.X.cpio) accessible to the disk.



Note - The sms_backup.X.X.cpio file of one SC cannot be used by the other SC. They are SC-specific files and are not interchangeable.




sc:# /opt/SUNWSMS/bin/smsbackup directory_name 

where directory_name is the name of the directory in which the backup file is created. This file can reside in any directory on the system, connected network, or tape device to which you have read/write privileges. If you do not specify a directory_name, the backup file is created in /var/tmp.

The directory_name you specify must be mounted as a UNIX file system (UFS). Specifying a temporary file system (TMPFS), such as /tmp, causes smsbackup to fail.

If you are not certain that your directory_name is mounted as a UFS, type the following command.


sc:# /usr/bin/df -F ufs directory_name

A UFS returns directory information. Any other type of file system returns a warning.

5. Start SMS.


sc:# /etc/init.d/sms start

6. Enable failover.


sc:sms-user:> /opt/SUNWSMS/bin/setfailover on


procedure icon  To Restore SMS 1.6 Software

1. Disable failover.


sc:sms-user:> /opt/SUNWSMS/bin/setfailover off

2. Stop SMS.


sc:# /etc/init.d/sms stop

3. Run smsrestore on the smsbackup file.


sc:# /opt/SUNWSMS/bin/smsrestore filename

where filename is the absolute path to the backup file that was created by smsbackup(1M). The filename must contain the full path name for the file. This file can reside anywhere on the system, connected network, or tape device. If no filename is specified, you receive an error.

4. Start SMS.


sc:# /etc/init.d/sms start

5. Enable failover.


sc:sms-user:> /opt/SUNWSMS/bin/setfailover on


Changing IP Address or Host Name of SC or Domain

This section describes how to change the IP address or host name of a domain or system controller.


procedure icon  To Change the IP Address of an SC or Domain

1. Update your name service maps with the new IP address.

2. Reboot the domain or system controller.


procedure icon  To Change the Host Name of a Domain or SC

1. Update your name service maps with the new host name.

2. Change the host name in the following files in the domain:

/etc/inet/hosts

/etc/nodename

/etc/hostname.interface-card-name

/etc/net/ticlts/hosts

/etc/net/ticlos/hosts

/etc/net/ticotsord/hosts

3. Reboot the domain or SC.

4. Change the host name in the following files, if applicable:

/etc/defaultdomain (only if your NIS domain name has changed)

/etc/hostname.* (only if your host name is specified in the file)

/etc/hostname6.* (only if your host name is specified in the file)

5. If the host name was changed in the SC, run the smsconfig -m command.

For more information about the smsconfig(1M) command, refer to the System Management Services (SMS) 1.6 Reference Manual or the SMS 1.6 man pages.