user resources csh.login restrictions
Clash 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
shell-script rhel csh etc
add a comment |Â
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
shell-script rhel csh etc
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
add a comment |Â
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
shell-script rhel csh etc
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
shell-script rhel csh etc
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
add a comment |Â
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
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
answered Jul 20 at 0:12
slmâ¦
232k65479649
232k65479649
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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