At 7.4, we started shipping the /QOpenSys/etc/profile in case we need to
   set default behavior. There is no mechanism in the PTFs to handle local
   editing though (changes will be overwritten). Instead, system admins
   should put changes they would normally put in /QOpenSys/etc/profile in
   /QOpenSys/etc/profile.local or add a file to /QOpenSys/etc/profile.d and
   they will be pulled in automatically by /QOpenSys/etc/profile.
    
   Or at least that's how it _should_ work, but the code to do that is
   missing... I'll open up a defect to get that fixed.
    
   You can always put a per-user file that overrides the system-wide one as
   well, though.
    
     ----- Original message -----
     From: B Stone <bvstone@xxxxxxxxx>
     Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxxxxxxxx>
     To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
     Cc:
     Subject: [EXTERNAL] [IBMiOSS] Best practice for global .profile file
     Date: Thu, Mar 26, 2020 9:29 AM
      
     I am wondering what the best practice for a global .profile file would
     be,
     and if used, would a personal .profile (/home/[user]/.profile) file be
     able
     to override and/or add to the global settings.
     The main reason I ask is I have a couple companies I'm doing nodeJS work
     for. Jobs run to start SSHD and start up nodejs servers daily/after IPL
     and
     they could run under any user id using QSH.
     I remember years ago talking about using /QOpenSys/etc/profile but I
     opened mine and had a note:
     # /QOpenSys/etc/profile for IBM i
     #
     #
     # DO NOT CHANGE /QOpenSys/etc/profile! It will be overwritten
     # via PTF or system upgrade. Instead, add system-specific changes
     # to /QOpenSys/etc/profile.local or add a file to
     # /QOpenSys/etc/profile.d. Users can also add their own changes
     # to ~/.profile (bsh, ksh, bash) ~/.login (csh), or ~/.bash_profile
     (bash)
     I remember adding this a couple years ago when I was playing with
     things.
     So now I'm wondering what would be the best practice... IBM seems to say
     it's ok to edit this file.  In fact, I'm sure I had this file like this
     before V7R4 updgrade... so OS upgrade didn't seem to overwrite it.
     Finally, are the profile files used in order global/personal or the
     other
     way around?  (I could test this, I thought I would ask).
     Or am I barking up the wrong tree entirely?  :)
     Bradley V. Stone
     www.bvstools.com
     MAILTOOL Benefit #15 <[1]
https://www.bvstools.com/mailtool.html ;>: The
     ability
     to add a Footer to each email sent using an IFS stream file.
     --
     This is the IBMi Open Source Roundtable (OpenSource) mailing list
     To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
     To subscribe, unsubscribe, or change list options,
     visit: [2]
https://lists.midrange.com/mailman/listinfo/opensource ;
     or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
     Before posting, please take a moment to review the archives
     at [3]
https://archive.midrange.com/opensource ;.
     Help support midrange.com by shopping at amazon.com with our affiliate
     link: [4]
https://amazon.midrange.com ;
      
    
References
   Visible links
   1. 
https://www.bvstools.com/mailtool.html
   2. 
https://lists.midrange.com/mailman/listinfo/opensource
   3. 
https://archive.midrange.com/opensource
   4. 
https://amazon.midrange.com/
As an Amazon Associate we earn from qualifying purchases.