Bug 1385586 - When using tcsh as default shell, the 'sbin'-related paths are missed in PATH-variable
Summary: When using tcsh as default shell, the 'sbin'-related paths are missed in PATH...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: tcsh
Version: 6.8
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: David Kaspar // Dee'Kej
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-17 11:03 UTC by Steffen Froemer
Modified: 2021-03-11 14:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-15 20:09:20 UTC
Target Upstream Version:


Attachments (Terms of Use)
rhel-6-ws-ks.cfg (535 bytes, text/plain)
2016-10-17 11:03 UTC, Steffen Froemer
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2709431 0 None None None 2016-10-17 11:03:13 UTC

Description Steffen Froemer 2016-10-17 11:03:14 UTC
Created attachment 1211308 [details]
rhel-6-ws-ks.cfg

Description of problem:
When configuring a user with default shell to be '/bin/tcsh', the PATH variable does not contain `/usr/local/sbin`, `/usr/sbin` and `/sbin`, except it is defined in '/etc/csh.login'

Version-Release number of selected component (if applicable):
tcsh 6.17.00 (Astron) 2009-07-10 (x86_64-unknown-linux) options wide,nls,dl,al,kan,sm,rh,color,filec


How reproducible:
Easily install a fresh RHEL-6.8 from DVD and create a user with default shell 'tcsh'. Then login to the system by using this user and look at the PATH variable.

Steps to Reproduce:
1. Install RHEL-6.8 Workstation with attached rhel-6-ws-ks.cfg
2. configure user 'useradd -m -s /bin/tcsh tcshuser && echo "password" | passwd --stdin tcshuser'
3. login with the recently created user
4. run the command 'env | grep PATH'

Actual results:
PATH=/usr/local/bin:/bin:/usr/bin

Expected results:
The path should defined like configured in '/etc/csh.login'

/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin


Additional info:
The correct path is defined in file '/etc/csh.login', but is only applied, if PATH is not set before. So it seems some routine is setting up the PATH outside of environment.

----
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
----

Comment 1 David Kaspar // Dee'Kej 2016-10-17 12:02:56 UTC
Please, provide the NVR of the tcsh package, for example by running this command:
> rpm -q tcsh
or
> rpm -qa | grep tcsh

I can't proceed otherwise, thank you.

Comment 2 Steffen Froemer 2016-10-17 12:56:38 UTC
Sorry David, my fault.

# rpm -q tcsh
tcsh-6.17-35.el6.x86_64

Comment 3 David Kaspar // Dee'Kej 2016-10-17 13:55:14 UTC
Thanks Steffen,

I will look into it. :)


Note You need to log in before you can comment on or make changes to this bug.