user resources csh.login restrictions

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I need to fix a vulnerability in a RedHat 6 server:



File /etc/csh.login must exist, and must trigger an invocation of source /etc/profile.d/IBMsinit.sh.



I verified file csh.login is in /etc, but I don't know where to put the invocation in the IBMSinit.sh:



# /etc/csh.login

# System wide environment and startup programs, for login setup

if ( $?PATH ) then
#do not override user specified PATH
else
if ( $uid == 0 ) then
setenv PATH
"/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
else
setenv PATH
"/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
endif
endif

setenv HOSTNAME `/bin/hostname`
set history=1000

if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r "$i" ) then
if ($?prompt) then
source "$i"
else
source "$i" >& /dev/null
endif
endif
end
unset i nonomatch
endif






share|improve this question





















  • do you have an online reference to this requirement? Otherwise I'm tempted to say "just add it at the end"
    – Jeff Schaller
    Jul 19 at 22:40
















up vote
1
down vote

favorite












I need to fix a vulnerability in a RedHat 6 server:



File /etc/csh.login must exist, and must trigger an invocation of source /etc/profile.d/IBMsinit.sh.



I verified file csh.login is in /etc, but I don't know where to put the invocation in the IBMSinit.sh:



# /etc/csh.login

# System wide environment and startup programs, for login setup

if ( $?PATH ) then
#do not override user specified PATH
else
if ( $uid == 0 ) then
setenv PATH
"/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
else
setenv PATH
"/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
endif
endif

setenv HOSTNAME `/bin/hostname`
set history=1000

if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r "$i" ) then
if ($?prompt) then
source "$i"
else
source "$i" >& /dev/null
endif
endif
end
unset i nonomatch
endif






share|improve this question





















  • do you have an online reference to this requirement? Otherwise I'm tempted to say "just add it at the end"
    – Jeff Schaller
    Jul 19 at 22:40












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I need to fix a vulnerability in a RedHat 6 server:



File /etc/csh.login must exist, and must trigger an invocation of source /etc/profile.d/IBMsinit.sh.



I verified file csh.login is in /etc, but I don't know where to put the invocation in the IBMSinit.sh:



# /etc/csh.login

# System wide environment and startup programs, for login setup

if ( $?PATH ) then
#do not override user specified PATH
else
if ( $uid == 0 ) then
setenv PATH
"/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
else
setenv PATH
"/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
endif
endif

setenv HOSTNAME `/bin/hostname`
set history=1000

if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r "$i" ) then
if ($?prompt) then
source "$i"
else
source "$i" >& /dev/null
endif
endif
end
unset i nonomatch
endif






share|improve this question













I need to fix a vulnerability in a RedHat 6 server:



File /etc/csh.login must exist, and must trigger an invocation of source /etc/profile.d/IBMsinit.sh.



I verified file csh.login is in /etc, but I don't know where to put the invocation in the IBMSinit.sh:



# /etc/csh.login

# System wide environment and startup programs, for login setup

if ( $?PATH ) then
#do not override user specified PATH
else
if ( $uid == 0 ) then
setenv PATH
"/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
else
setenv PATH
"/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
endif
endif

setenv HOSTNAME `/bin/hostname`
set history=1000

if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r "$i" ) then
if ($?prompt) then
source "$i"
else
source "$i" >& /dev/null
endif
endif
end
unset i nonomatch
endif








share|improve this question












share|improve this question




share|improve this question








edited Jul 22 at 0:12









slm♦

232k65479649




232k65479649









asked Jul 19 at 21:48









user301459

82




82











  • do you have an online reference to this requirement? Otherwise I'm tempted to say "just add it at the end"
    – Jeff Schaller
    Jul 19 at 22:40
















  • do you have an online reference to this requirement? Otherwise I'm tempted to say "just add it at the end"
    – Jeff Schaller
    Jul 19 at 22:40















do you have an online reference to this requirement? Otherwise I'm tempted to say "just add it at the end"
– Jeff Schaller
Jul 19 at 22:40




do you have an online reference to this requirement? Otherwise I'm tempted to say "just add it at the end"
– Jeff Schaller
Jul 19 at 22:40










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










As was mentioned in the comments by @steeldriver the bottom portion of the /etc/csh.login script is as follows:



....
foreach i ( /etc/profile.d/*.csh )
if ( -r "$i" ) then
if ($?prompt) then
source "$i"
else
source "$i" >& /dev/null
endif
endif
end
unset i nonomatch
endif


That foreach loop is only processing files from /etc/profile.d/ that match the pattern *.csh. So you'd just need to rename /etc/profile.d/IBMsinit.sh to this: /etc/profile.d/IBMsinit.csh.



Once you do that, the csh.login script will source all the *.csh files from /etc/profile.d and you should be set.



If you look in the /etc/profile.d directory, on most systems it contains both *.sh and *.csh files. The *.sh files are meant for Bourne & ZSH shells, while the *.csh files are meant for CSH & TCSH.






share|improve this answer





















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f457307%2fuser-resources-csh-login-restrictions%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    As was mentioned in the comments by @steeldriver the bottom portion of the /etc/csh.login script is as follows:



    ....
    foreach i ( /etc/profile.d/*.csh )
    if ( -r "$i" ) then
    if ($?prompt) then
    source "$i"
    else
    source "$i" >& /dev/null
    endif
    endif
    end
    unset i nonomatch
    endif


    That foreach loop is only processing files from /etc/profile.d/ that match the pattern *.csh. So you'd just need to rename /etc/profile.d/IBMsinit.sh to this: /etc/profile.d/IBMsinit.csh.



    Once you do that, the csh.login script will source all the *.csh files from /etc/profile.d and you should be set.



    If you look in the /etc/profile.d directory, on most systems it contains both *.sh and *.csh files. The *.sh files are meant for Bourne & ZSH shells, while the *.csh files are meant for CSH & TCSH.






    share|improve this answer

























      up vote
      0
      down vote



      accepted










      As was mentioned in the comments by @steeldriver the bottom portion of the /etc/csh.login script is as follows:



      ....
      foreach i ( /etc/profile.d/*.csh )
      if ( -r "$i" ) then
      if ($?prompt) then
      source "$i"
      else
      source "$i" >& /dev/null
      endif
      endif
      end
      unset i nonomatch
      endif


      That foreach loop is only processing files from /etc/profile.d/ that match the pattern *.csh. So you'd just need to rename /etc/profile.d/IBMsinit.sh to this: /etc/profile.d/IBMsinit.csh.



      Once you do that, the csh.login script will source all the *.csh files from /etc/profile.d and you should be set.



      If you look in the /etc/profile.d directory, on most systems it contains both *.sh and *.csh files. The *.sh files are meant for Bourne & ZSH shells, while the *.csh files are meant for CSH & TCSH.






      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        As was mentioned in the comments by @steeldriver the bottom portion of the /etc/csh.login script is as follows:



        ....
        foreach i ( /etc/profile.d/*.csh )
        if ( -r "$i" ) then
        if ($?prompt) then
        source "$i"
        else
        source "$i" >& /dev/null
        endif
        endif
        end
        unset i nonomatch
        endif


        That foreach loop is only processing files from /etc/profile.d/ that match the pattern *.csh. So you'd just need to rename /etc/profile.d/IBMsinit.sh to this: /etc/profile.d/IBMsinit.csh.



        Once you do that, the csh.login script will source all the *.csh files from /etc/profile.d and you should be set.



        If you look in the /etc/profile.d directory, on most systems it contains both *.sh and *.csh files. The *.sh files are meant for Bourne & ZSH shells, while the *.csh files are meant for CSH & TCSH.






        share|improve this answer













        As was mentioned in the comments by @steeldriver the bottom portion of the /etc/csh.login script is as follows:



        ....
        foreach i ( /etc/profile.d/*.csh )
        if ( -r "$i" ) then
        if ($?prompt) then
        source "$i"
        else
        source "$i" >& /dev/null
        endif
        endif
        end
        unset i nonomatch
        endif


        That foreach loop is only processing files from /etc/profile.d/ that match the pattern *.csh. So you'd just need to rename /etc/profile.d/IBMsinit.sh to this: /etc/profile.d/IBMsinit.csh.



        Once you do that, the csh.login script will source all the *.csh files from /etc/profile.d and you should be set.



        If you look in the /etc/profile.d directory, on most systems it contains both *.sh and *.csh files. The *.sh files are meant for Bourne & ZSH shells, while the *.csh files are meant for CSH & TCSH.







        share|improve this answer













        share|improve this answer



        share|improve this answer











        answered Jul 20 at 0:12









        slm♦

        232k65479649




        232k65479649






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f457307%2fuser-resources-csh-login-restrictions%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay