Env Manager

 

FAQ:

A Simple Environment Manager for Solaris

By Colin A. Bitterfield
EX-SUN Microsystems, Inc
Contact Me


 Prologue:

 One of the key issues I see as an UNIX professional is a lack of control and single place for environment variables throughout shells, X window managers, and telnet. Network Operating Systems for PCs main Novell and Banyan, NT still does not have a real facility, had the concept that the environment had three categories (system, group, and user). Each category needs variables specfic to it. For instance oracle users need ORA_HOME set. Different Oracle users may have different SIDs set. Solaris has a couple of configurable options that are rarely configured. So this FAQ is designed to be a simple environment manager for (sh, ksh, jsh, & bash). I will address "C" shell varients in version 2.
 
 

 How to I install this:


Download the latest version 1.0

Please note this file is setup to be an extract to root so you can install with it. I recommend that you extract into a directory review my work and then decide if you want to extract to root.

You will receive this files
a etc/profile 1K
a etc/envmgr 1K
a etc/default/global 1K
a etc/dt/config/ 0K
a etc/dt/config/Xsession.d/ 0K
a etc/dt/config/Xsession.d/envmgr symbolic link to ../../../envmgr
a etc/default/login 2K
a etc/default/su 1K
a etc/default/users/ 0K
a etc/default/groups/ 0K
a etc/skel/local.cshrc 1K
a etc/skel/local.login 1K
a etc/skel/local.profile 1K

Replace /etc/profile with profile.Replace the /etc/skel files with the ones provided.Put the file envmgr in /etc/ (Note permissions, must be readable by all)Create the directories /etc/dt, /etc/dt/config, /etc/dt/config/Xsession.dLink the envmgr file as follows (cd /etc/dt/config/Xsession.d; ln -s ../../../envmgr .)Put the file global in /etc/defaultCreate the directories /etc/default/groups & /etc/default/users
 

 How do I configure this:

 To configure PATH and TIMEZONE edit /etc/default/login

To configure system wide variables edit /etc/default/global

To configure group wide variables create/edit a file /etc/default/groups/groupname (That is the same as in /etc/group)

To configure user local variables (i.e. like a .profile) create/edit a file /etc/default/users/username (That is the login account name)
 
 

 What is the format for the configuration files:


variable=value; export variable (Same as bourne, bash or ksh)

i.e.

CC=/opt/SUNWspro/bin/cc; export CC
MOZILLA_HOME=/usr/netscape; export MOZILLA_HOME
MANPATH=/usr/man:/usr/local/man:/opt/sfw/man; export MANPATH
 
 

 What am I going to do in version 2

  • Add the "C" Shell variants
  • Most likely change the format of the configuration files to make them shell independent.
  • Allow the ability to set Aliases in the configuration files

Troubleshooting:

  • Check the permissions

-rw-r--r--   1 root     sys           124 Jun 10 20:25 local.cshrc
-rw-r--r--   1 root     sys           607 Jun 10 20:25 local.login
-rw-r--r--   1 root     sys           552 Jun 13 06:46 local.profile
-r-xr--r--   1 root     sys           945 Jun 13 06:50 /etc/profile
-r-xr--r--   1 root     sys           455 Jun 12 21:16 /etc/envmgr
-r--r--r--   1 root     sys           251 Jun 13 06:53 ./etc/default/global
drwxr-xr-x   2 root     sysadmin      512 Jun 13 06:54 ./etc/default/groups
drwxr-xr-x   2 root     sysadmin      512 Jun 13 06:54 ./etc/default/users
drwxr-xr-x   3 root     sys           512 Jun 11 21:01 ./etc/dt
drwxr-xr-x   3 root     sys           512 Jun 11 21:01 ./etc/dt/config
drwxr-xr-x   2 root     sys           512 Jun 12 20:58 ./etc/dt/config/Xsession.d
lrwxrwxrwx   1 root     other          15 Jun 12 20:58 ./etc/dt/config/Xsession.d/envmgr -> ../../../envmgr
 

last update on 28 Apr, 2005

[Colin's Home] [News] [Contact me] [Articles] [Solaris Resources] [Win32 Resources] [Mooniacs] [Aviation] [Photo Albums] [Family] [Private]