This chapter describes differences in tasks you may perform to set up the local user environment after installing the Solaris 7 software.
The login shell is the command interpreter that runs when you are logged in. The Solaris 7 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 Basic Features of the Bourne, C, and Korn Shells
Feature |
Bourne |
C |
Korn |
---|---|---|---|
Syntax compatible with sh |
Yes |
No |
Yes |
Job control |
Yes |
Yes |
Yes |
History list |
No |
Yes |
Yes |
Command-line editing |
No |
Yes |
Yes |
Aliases |
No |
Yes |
Yes |
Single-character abbreviation for login directory |
No |
Yes |
Yes |
Protect files from overwriting (noclobber) |
No |
Yes |
Yes |
Ignore Control-D (ignoreeof) |
No |
Yes |
Yes |
Enhanced cd |
No |
Yes |
Yes |
Initialization file separate from .profile |
No |
Yes |
Yes |
Logout file |
No |
Yes |
No |
To change from one shell to another, use one of the following methods:
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 a windows environment, use Admintool. See OpenWindows Advanced User's Guide for information.
After you change to a new shell, log out and log in again to activate the shell.
This section describes how to determine which initialization files you can edit to customize the local environment based on your choice of login shell, and where to find them in the SunOS release 5.7 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 Initialization Files for Bourne, C, and Korn Shells
Shell |
Initialization File |
Purpose |
---|---|---|
/etc/profile |
Defines system profile at login |
|
|
Defines user's profile at login |
|
/etc/.login |
Defines system environment at login |
|
|
Defines user's environment at login |
|
|
$HOME/.login |
Defines user's profile at login |
Korn |
/etc/profile |
Defines system profile at login |
|
$HOME/.profile |
Defines user's profile at login |
|
Defines 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 the SunOS release 4 software. 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 Default Home Directory Startup Files
Shell |
File |
---|---|
/etc/skel/local.profile |
|
/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.
The SunOS release 5.7 software can use the old SunOS release 4 system files and initialization files such as .login, .cshrc, and.profile to re-create the look and feel of the SunOS release 4 work environment. Many of these SunOS release 4 files can be converted, or used as they are, and executed easily.
The installation process in Chapter 3, Converting a SunOS Release 4 System to the Solaris 7 Environment, explains how to re-create the SunOS release 4 environment within the Solaris 7 operating environment.
The Common Desktop Environment (CDE) is the default Solaris 7 windowing environment and offers a simple and intuitive interface. See Chapter 14, Solaris Common Desktop Environment, for more information about CDE.
The OpenWindows 3.1 software can also be used as your preferred desktop with the Solaris 7 environment. 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 the SunOS release 5.7 software and its usage is correct.
SunView software is not part of the Solaris 7 operating environment. 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 the OpenWindows 3.1 environment
The applications that are not compatible between OpenWindows Version 2.0 and 3.1 platforms
Guidelines for modifying incompatible applications
This section describes your options for performing user and group administration.
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 enable you to do most of the tasks supported by Admintool from the command line without running the OpenWindows or CDE software.
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.
This section describes changes to the general procedure for adding user accounts.
The general procedure for adding new users to a SunOS release 4 system was:
Edit the /etc/passwd file and add an entry for the new user.
Create a home directory and set the permissions for the new user.
Set up skeletal files for the new user (.cshrc, .login, .profile, and so on).
Add the new user to the naming service (NIS).
In the Solaris 7 operating environment, there are three ways to add (and maintain) user accounts:
Use Admintool - This is the most straightforward 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 procedure with a few exceptions)
Because the SunOS release 5.7 software uses a shadow password file, simply editing the /etc/passwd file is no longer sufficient. 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. It also explains security considerations for controlling user access to systems and networks.
The SunOS release 4 mail programs are different in the Solaris 7 operating environment; however, procedures for setting up mail are still the same. The SunOS release 4 version of mail is included in the SunOS/BSD Source Compatibility Package. Its user interface is different from the Solaris 7 operating environment's version of mail. Additionally, some useful mail facilities are included for compatibility.
In the Solaris 7 operating environment, there are three programs for sending and retrieving your mail. All three are backward compatible and can be used to read your SunOS release 4 mail. They are:
mailtool, the OpenWindows interface for the mail program. New Solaris 7 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 7 mail reading program. It is an enhanced version of SunOS release 4 /usr/ucb/mail. In the Solaris 7 operating environment, /usr/ucb/mail is a link to /usr/bin/mailx. mailx offers message headers that enable you to preview the sender and subject of each message before you read it. 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 7 interface is similar to the SunOS release 4 /usr/bin/mail version (see the bin-mail(1) manual page in SunOS release 4 Reference Manual).
See the mail(1) man page for more information on mail.
For a complete discussion of all Solaris 7 mail programs, see Mail Administration Guide.
This section outlines the main differences in document tools used in SunOS release 4 and the Solaris 7 operating environment.
The Solaris 7 operating environment provides a set of PostScript filters and device-independent fonts. However, most SunOS release 4 TranScript filters have SunOS release 5.7 equivalents while a few less common ones do not. In SunOS release 5.7 systems, there is no TEX filter, no pscat (C/A/T) filter, and no raster image filter.
The Solaris 7 operating environment provides device-independent troff, with the following features: SunOS release 4 troff input files work with Solaris 7 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 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.7 man page directories.
Table 6-4 SunOS release 5.7 man Page Directories
/man Directory |
Contents |
Suffixes |
---|---|---|
man1 |
User commands |
1B - SunOS/BSD compatibility commands |
|
|
1C - Communication commands |
|
|
1F - FMLI commands |
|
|
1S - SunOS commands |
man1M |
System administration commands |
|
man2 |
System calls |
|
man3 |
Library functions |
3B - 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 |
|
|
3S - Standard I/O functions |
|
|
3T - Threads library functions |
|
|
3X - Miscellaneous library functions |
man4 |
File formats |
4B - SunOS/BSD compatibility file formats |
man5 |
Headers, tables, and macros |
|
man7 |
Special files |
|
man9 |
DDI/DKI |
|
man9E |
DDI/DKI entry points |
|
man9F |
DDI/DKI kernel functions |
|
man9S |
DDI/DKI data structures |
Unlike the SunOS release 4 software, which searched the individual man directories according to a predetermined order, the SunOS release 5.7 software 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/ |
The SunOS release 4 man page table of contents and keyword database is called whatis. In the SunOS release 5.7 software, 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.6% man -k tset reset tset (1b) - establish or restore terminal characteristics tset tset (1b) - establish or restore terminal characteristics |
Table 6-5 shows that SunOS release 5.7 version of the man command has additional search options.
Table 6-5 New man Command Options
Option |
Description |
---|---|
-a |
Displays all man pages that match file name. The pages are displayed sequentially in the order they are found. |
-l |
Lists all man pages that match file name. You can use the output of this command to specify a section number with the -s option. |
-s section-number |
Searches section-number for file name. In the SunOS release 4 software, the man command accepted the section number as an option; in this release, the section number must be preceded by -s. |
-F |
Forces 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.7 man command.