Solaris Trusted Extensions Administrator's Procedures

ProcedureHow to Assign the Editor of Your Choice as the Trusted Editor

The trusted editor uses the value of the $EDITOR environment variable as its editor.

Before You Begin

You must be in a role in the global zone.

  1. Determine the value of the $EDITOR variable.


    # echo $EDITOR
    

    The following are editor possibilities. The $EDITOR variable might also not be set.

    • /usr/bin/gedit – Is the editor that GNOME provides. Trusted GNOME is the trusted version of that desktop.

    • /usr/bin/vi – Is the visual editor.

  2. Set the value of the $EDITOR variable.

    • To set the value permanently, modify the value in the shell initialization file for the role.

      For example, in the role's home directory, modify the .kshrc file for a Korn shell, and the .cshrc file for a C shell.

    • To set the value for the current shell, set the value in the terminal window.

      For example, in a Korn shell, use the following commands:


      # setenv EDITOR=pathname-of-editor
      # export $EDITOR

      In a C shell, use the following command:


      # setenv EDITOR=pathname-of-editor
      

      In a Bourne shell, use the following commands:


      # EDITOR=pathname-of-editor
      # export EDITOR

Example 11–1 Specifying the Editor for the Trusted Editor

The Security Administrator role wants to use vi when editing system files. A user who has assumed the role modifies the .kshrc initialization file in the role's home directory.


$ cd /home/secadmin
$ vi .kshrc

## Interactive shell
set -o vi
...
export EDITOR=vi

The next time that any user assumes the Security Administrator role, vi is the trusted editor.