Bug 92132

Summary: zsh does not source /etc/profile or /etc/profile.d/*
Product: [Retired] Red Hat Linux Reporter: Ian Macdonald <ian>
Component: zshAssignee: Jens Petersen <petersen>
Status: CLOSED DUPLICATE QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:53:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Ian Macdonald 2003-06-03 01:13:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030531

Description of problem:
zsh, as shipped, does not source /etc/profile. Consequently, files in
/etc/profile.d aren't sourced either.

This is because zsh only sources /etc/profile when run in sh or ksh
compatibility mode. By default, it does not run in either of these modes.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. chsh your shell to /bin/zsh
2. open a log-in shell
3. notice that /etc/profile has had no effect
    

Actual Results:  Neither /etc/profile nor anything in /etc/profile.d/* sourced.

Expected Results:  Sourcing /etc/profile and stuff in /etc/profile.d/* is desirable.

Additional info:

A workaround is to add 'emulate sh' to /etc/zshrc, but that's not necessarily
desirable, since it changes some of zsh's default settings.

Comment 1 Ian Macdonald 2003-06-03 03:53:57 UTC
I gave a workaround in my bug report, but the fix is equally obvious. Add the
following line to /etc/zshrc:

. /etc/profile


Comment 2 Jens Petersen 2003-06-03 05:03:15 UTC
Try adding the contents of "/etc/skel/.zshrc" to your .zshrc file.


*** This bug has been marked as a duplicate of 88457 ***

Comment 3 Red Hat Bugzilla 2006-02-21 18:53:20 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.