Solaris 1.x to 2.x Transition Guide
  Search only this book
Download this book in PDF

User Environment Administration

6

This chapter describes differences in tasks you may perform to set up the local user environment after installing the Solaris 2.5 software.
Selecting a Default Shellpage 49
Customizing User Environmentspage 51
Window Systempage 52
User and Group Administrationpage 53
Using Mailpage 54
Using Document Toolspage 55
man Page Organization Differencespage 56

Selecting a Default Shell

The login shell is the command interpreter that runs when you are logged in. The Solaris 2.5 operating environment offers three shells:
  • Bourne shell, the default shell (/bin/sh)
  • C shell (/bin/csh)
  • Korn shell (/bin/ksh)
If you use the shell often, you may prefer to use the C shell or the Korn shell because of their interactive capabilities. Table 6-1 lists the features of all three shells.
Table 6-1
FeatureBourneCKorn
Syntax compatible with shYesNoYes
Job controlYesYesYes
History listNoYesYes
Command-line editingNoYesYes
AliasesNoYesYes
Single-character abbreviation for login directoryNoYesYes
Protect files from overwriting (noclobber)NoYesYes
Ignore Control-D (ignoreeof)NoYesYes
Enhanced cdNoYesYes
Initialization file separate from.profileNoYesYes
Logout fileNoYesNo
Use one of the following methods if you want to change from one shell to another:
  • Method 1 - Edit the information in the last field of the line in the /etc/passwd file that begins with your login name. If this entry is blank or sh, the login shell is the Bourne shell; if the entry is csh, the login shell is the C shell; if the entry is ksh, the login shell is the Korn shell.
  • Method 2 - In OpenWindows, use Admintool. See Solaris Advanced User's Guide for information.
After you change to a new shell, log out and log in again, to activate the shell.

Customizing User Environments

This section describes how to determine which initialization files to edit to customize the local environment based on your choice of login shell, and where to find them in the SunOS release 5.5 file systems. Set up your environment by editing the variables in the initialization files. The default shell determines which files you need to edit: .profile, .login, or.cshrc. Table 6-2 shows the initialization files for the Bourne, C, and Korn shells.
Table 6-2
ShellInitialization FilePurpose
Bourne/etc/profileDefines system profile at login
$HOME/.profileDefines user's profile at login
C/etc/.loginDefines system environment at login

$HOME/.cshrcDefines user's environment at login

$HOME/.loginDefines user's profile at login
Korn/etc/profileDefines system profile at login
$HOME/.profileDefines user's profile at login
$HOME/ksh_envDefines user's environment at login in the file specified by the ksh_env variable
In this release, the shell initialization-file templates have moved to the /etc/skel directory from /usr/lib, where they were in SunOS release 4.x. The template file locations are shown in Table 6-3. Copy the template file (or files) for the appropriate default shell to your home directory before you modify it.
Table 6-3
ShellFile
Bourne/etc/skel/local.profile
C/etc/skel/local.login
/etc/skel/local.cshrc
Korn/etc/skel/local.profile
For information on setting up initialization files, see System Administration Guide, Volume I.

Using the SunOS 4.x Work Environment With Solaris

If you prefer to continue using the SunOS release 4.x work environment, SunOS release 5.5 can use the old system files and initialization files such as .login, .cshrc, and.profile to re-create the look and feel of SunOS release 4.x. Many of these SunOS release 4.x files can be converted, or used as they are, and executed easily.
The installation process in Chapter 3, "Installation and Configuration Changes," explains how to re-create the SunOS release 4.x environment within the Solaris 2.5 operating environment.

Window System

OpenWindows 3.2 is the default Solaris 2.5 windowing environment. The OpenWindows environment offers a simple and intuitive interface for users of Solaris 2.5 system software. If you have been using the OpenWindows 2.0 environment, you will notice that the OpenWindows 3.1 icons have changed and some applications are not compatible with the OpenWindows 3.1 platform.
The OpenWindows Developer's Guide File Chooser (gfm) regular expression file pattern matching code (filter_pat) is slightly different from the regular expression file pattern matching code in the XView File Chooser object. This could result in the same regular expression matching slightly different sets of files in the two different choosers. The XView File Chooser uses /usr/include/reexp.h in SunOS release 5.5 and its usage is correct.
SunView(TM) software is not part of the Solaris 2.5 operating environment. If you have been using the SunView environment, you will find that your SunView applications are incompatible with the OpenWindows environment and must be converted.
See OpenWindows Version 3.1 User's Guide for information about:
  • Features of OpenWindows 3.1
  • The applications that are not compatible between OpenWindows Version 2.0 and 3.1 platforms
  • Guidelines for modifying incompatible applications

User and Group Administration

This section describes your options for performing user and group administration.

User and Group Administration Choices

You can add, modify, and remove users and groups through the command-line interface using useradd, userdel, and usermod. Although these commands are not as robust as Admintool, they do allow you to do most of the tasks supported by Admintool from the command line without running OpenWindows.
The useradd, userdel, and usermod commands are similar to editing the /etc files in that they also affect only the local system. These commands cannot be used to change any information in the network naming service. However, you can use useradd to verify the uniqueness of the user name and user ID and the existence of group names in the network naming service.

Adding User Accounts

This section describes changes to the general procedure for adding user accounts.

Changes to the Procedure

The general procedure for adding new users to a SunOS release 4.x system was:
  1. Edit the /etc/passwd file and add an entry for the new user. 2. Create a home directory and set the permissions for the new user. 3. Set up skeletal files for the new user (.cshrc, .login, .profile...). 4. Add the new user to the naming service (NIS).

In the Solaris 2.5 operating environment, there are three ways to add (and maintain) user accounts:
  • Use Admintool - This is the most straight forward method to use if the system is running the OpenWindows environment.
  • Use command-line interfaces (useradd, usermod, and userdel) - Use this method if you don't want to use Admintool.
  • Manually edit files (similar to the SunOS release 4.x procedure with a few exceptions)

Note - Because SunOS release 5.5 uses a shadow password file, it is no longer sufficient just to edit the /etc/passwd file. You should not attempt this method unless you have ample experience with this type of administration.

System Administration Guide, Volume I describes in detail the policy decisions you should consider before you begin to set up accounts. System Administration Guide, Volume II explains security considerations for controlling user access to systems and networks.

Using Mail

The SunOS release 4.x mail programs are different in the Solaris 2.5 operating environment; however, procedures for setting up mail are still the same. The SunOS release 4.x version of mail is included in the SunOS/BSD Source Compatibility Package. Its user interface is different from the Solaris 2.5 operating environment's version of mail. Additionally, some useful mail facilities are included for compatibility.
In the Solaris 2.5 operating environment, there are three programs for sending and retrieving your mail. All three are backward compatible and can be used to read your old SunOS release 4.x mail. They are:
  • mailtool, the OpenWindows interface for the mail program. New Solaris 2.5 mailtool options enable you to attach files to your messages, include third-party messages with your mail, deliver mail to multiple recipients, and send audio messages.

    See OpenWindows Version 3.1 User's Guide for a complete discussion of mailtool.

  • mailx, which is installed under /usr/bin/mailx. This is the Solaris 2.5 mail reading program. It is an enhanced version of SunOS release 4.x /usr/ucb/mail. In the Solaris 2.5 operating environment, /usr/ucb/mail is a link to /usr/bin/mailx. mailx offers message headers that allow you to preview the sender and subject of each message before you read them. You can also switch between reading, sending, and editing mail messages.

    See the mailx(1) man page for more information on mailx.

  • mail refers to the mail program under /usr/bin/mail. The Solaris 2.5 interface is similar to the SunOS release 4.x /usr/bin/mail version (see the bin-mail(1) manual page in SunOS 4.x Reference Manual.

    See the mail(1) man page for more information on mail.

For a complete discussion of all Solaris 2.5 mail programs, see Mail Administration Guide.

Using Document Tools

This section outlines the main differences in using document tools between SunOS release 4.x and the Solaris 2.5 operating environment.
  • The Solaris 2.5 operating environment provides a set of PostScript(R) filters and device-independent fonts. However, most SunOS release 4.x TranScript(R) filters have SunOS release 5.5 equivalents, while a few less common ones do not. In SunOS release 5.5 systems, there is no TEX filter, no pscat (C/A/T) filter, and no raster image filter.
  • The Solaris 2.5 operating environment provides device-independent troff, with the following features: SunOS release 4.x troff input files work with Solaris 2.5 troff; troff default output goes to the standard output instead of the printer. Therefore, you must specify a printer when you send troff output to the printer.

man Page Organization Differences

man pages organization has changed to be compatible with SVR4 organization. As a result, some sections have been renamed. For example, man (8) is now man (1M).
Table 6-4 shows SunOS release 5.5 man page directories.
Table 6-4 man
/man DirectoryContentsSuffixes
man1User commands1B - SunOS/BSD compatibility commands

1C - Communication commands

1F - FMLI commands

1S - SunOS commands

man1MSystem administration commands
man2System calls
man3Library functions3B - SunOS/BSD compatibility libraries
3C - C library functions
3E - ELF library functions
3G - C library functions
3I - Wide Character functions
3K - Kernel VM library functions
3M - Math library
3N - Network functions
3R - RPC services library
Table 6-4 man(Continued)
/man DirectoryContentsSuffixes


3S - Standard I/O functions
3T - Threads library functions
3X - Miscillaneous library functions
man4File formats4B - SunOS/BSD compatibility file formats
man5Headers, tables, and Macros
man7special files
man9DDI/DKI
man9EDDI/DKI entry points
man9FDDI/DKI kernel functions
man9SDDI/DKI data structures

Customizing the man Command Search Path

Unlike SunOS release 4.x, which searched the individual man directories according to a predetermined order, SunOS release 5.5 lets you determine the search path. The man command uses the path set in the man page configuration file, man.cf.
Each component of the MANPATH environment variable can contain a different man.cf file. You can modify man.cf to change the order of the search; for example, to search 3b before 3c. The configuration file for the /usr/share/man directory follows.

  #  
  # Default configuration file for the on-line manual pages.  
  #  
  
  MANSECTS=1,1m,1c,1f,1s,1b,2,3,3c,3s,3x,3i,3t,3r,3n,3m,3k,3g, \  
  3e,3b,9f,9s,9e,9,4,5,7,4b,6,l,n  

The arguments to MANSECTS are derived from the man subdirectories available. The number of subdirectories has increased dramatically in this release because each subsection has its own directory. This new structure improves the performance of the man command and gives you finer control over the search path. The next two figures compare the man directories for the two releases.

  sunos4.1% ls /usr/share/man  
  man1/   man2/   man3/   man4/   man5/   man6/   man7/   man8/  
  manl/   mann/  


  sunos5.3% ls /usr/share/man  
  man.cf  man1f/  man3/   man3g/  man3n/  man3x/  man6/   man9f/  
  man1/   man1m/  man3b/  man3i/  man3r/  man4/   man7/   man9s/  
  man1b/  man1s/  man3c/  man3k/  man3s/  man4b/  man9/   manl/  
  man1c/  man2/   man3e/  man3m/  man3t/  man5/   man9e/  mann/  

whatis and windex Databases

In SunOS release 4.x, the man page table of contents and keyword database is called whatis. In SunOS release 5.5, this information is in the windex file. In both releases, the database is created by the catman command, and is used by the man, apropos, and whatis commands.
The windex file also has a slightly different format than the whatis file, as you can see from the following comparison of the two release versions.

  sunos4.1% man -k tset  
  tset, reset (1)    - establish or restore terminal characteristics  


  sunos5.3% man -k tset  
  reset  tset (1b)   - establish or restore terminal characteristics  
  tset   tset (1b)   - establish or restore terminal characteristics  

Using the man Command

Table 6-5 shows that SunOS release 5.5's version of the man command has additional search options.
Table 6-5 man
OptionDescription
-aDisplays all man pages that match file name. The pages are displayed sequentially in the order they are found.
-lLists all man pages that match the file name. You can use the output of this command to specify a section number with the -s option.
-s section-numberSearches section-number for file name. In SunOS release 4.x, the man command accepted the section number as an option; in this release, the section number must be preceded by -s.
-FForces the man command to search all directories until file name is found. This option overrides the windex database and the man.cf file.
See the man(1) man page for a complete description of the SunOS release 5.5 man command.