| 
 NVenvironment is the heart of it but I do a little bit more in the 
.profile shell script.  It does not run automatically on login or on 
the sudo so I have to execute it with the ". ~/.profile" command after the login 
or  "sudo ksh" is executed.  I should probably put it in ~/.bashrc but 
I ported from a Solaris system this summer and haven't completely climbed the 
learning curve for the Linux system.  Here's what I do: 
 
  #!/bin/ksh if [ "$LOGNAME" = "root" ]     
  #  See if we are under SUDO then 
  prompt=${1:-"#"}             
  # If we are under sudo set the prompt to the hash else 
  prompt=${1:-"$"}             
  # for normal use prompt with the currency symbol fi stty erase 
  ^H                         
  # set the backspace key to work  
    
  export PS1="${HOSTNAME}${prompt}"    # Make the prompt 
  identify the machine plus the symbol 
                                                               
  # This tells me where I am and what mode I'm in on the prompt line set -o 
  vi                                                 # 
  Allow me to edit input lines. export 
  PATH=/usr/OV/bin:$PATH            # 
  Guarantee access to NetVIew's commands  . 
  /usr/OV/bin/NVenvironment                   
  # Now set the NetView environment for THIS shell.  export 
  MOZILLA_HOME=/usr/local/firefox # Enable firefox as the browser for NetView 
  help. 
   
Bill Evans 
  
  
 -----Original Message----- From: 
owner-nv-l@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com] On Behalf Of 
Kain, Becki (B.) Sent: Monday, September 12, 2005 9:18 
AM To: nv-l@lists.us.ibm.com Subject: RE: [nv-l] Nv 7.1.4 
fp3 on suse 9 sp 1
 
  
  that's what we're going to have to try.  you're just doing . 
  /usr/OV/bin/NVenvironment, right? 
    
  
  
  
  In 
  my case I execute the NVenvironment and other initialization procedured AFTER 
  I invoke “sudo ksh”.   It bothers the security fanatics who want 
  each command to be executed individually under sudo so they can be tracked but 
  does allow me to get the job done without knowing the root password.  
   
    
  
  -----Original 
  Message----- From: 
  owner-nv-l@lists.us.ibm.com 
  [mailto:owner-nv-l@lists.us.ibm.com] 
  On Behalf Of Kain, Becki 
  (B.) Sent: 
  Friday, September 09, 
  2005 10:25 
  AM To: nv-l@lists.us.ibm.com Subject: [nv-l] Nv 7.1.4 fp3 on suse 9 sp 
  1 
    
  Hello all:  
  Since suse 9 seems to have changed 
  it's default sudo behavior to not pass variables in that were set by the user 
  (in our case $LD_LIBRARY_PATH), what are other folks doing to get netview 
  commands that require root (aka sudo) to work? 
  Thanks in advance 
     
 |