zopencommunity / zopencommunity/bashport

Setting Bash as the default shell in your RACF OMVS segment breaks your shell if you don't have any commands in /etc/profile

Open
#93 0 comments 0 reactions 1 assignee View on GitHub

@IgorTodorovskiIBM is already working on this.

Since Aug 15, 2025.

Dominant language
Groovy
Stars
12
Forks
7
PR merge metrics
No merged PRs in 30d

Description

If I set zopen bash as my default shell in my RACF OMVS segment and I have a /etc/profile that just exports some environment variables, the shell will break.

OMVS Segment:

OMVS INFORMATION
----------------
...
PROGRAM= /usr/local/zopen/local/bin/bash
...

/etc/profile

# encoding & tagging stuff
export _BPXK_AUTOCVT='ON'
export _CEE_RUNOPTS='FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)'
export _TAG_REDIR_ERR=txt
export _TAG_REDIR_IN=txt
export _TAG_REDIR_OUT=txt

# zopen
export ZOPEN_HOME=/usr/local/zopen/local
export PATH=${ZOPEN_HOME}/bin:$PATH
export LIBPATH=${ZOPEN_HOME}/lib:$LIBPATH
export MANPATH=${ZOPEN_HOME}/share:$MANPATH

# zoau
export ZOAU_HOME=/usr/lpp/IBM/zoau/v1r3
export PATH=${ZOAU_HOME}/bin:$PATH
export LIBPATH=${ZOAU_HOME}/lib:$LIBPATH
export PYTHONPATH=${PYTHONPATH}:${ZOAU_HOME}/lib
export MANPATH=${ZOAU_HOME}/docs/%L:$MANPATH

Broken Shell on Login:

$ ssh sys1
�/�����

However, if i just add a command (like ls for example) to the end of /etc/profile, everything works:

% ssh sys1
-bash-5.3#

I tested this on a 3.1 system that should have all of the latest service installed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.