achinayoung_wau Respected Contributor.
Respected Contributor.
856 views

Replace pcksh with a modern shell, like bash?

Any plans to make changes to bash like you did for pdksh, creating pcksh? Easier to work in bash with it's command-line editing (i.e. up-down arrow keys working) than pcksh.
Tags (2)
0 Likes
4 Replies
Knowledge Partner
Knowledge Partner

Re: Replace pcksh with a modern shell, like bash?

I think what you are asking is if you can have monitoring (like cpcksh)
but with a non-NPUM shell (e.g. Bash). Have you seen TID# 7017938 which
describes a way to do this today?

https://www.novell.com/support/kb/doc.php?id=7017938

Shipping a new version of bash would be very risky for any vendor to do,
so it seems like the approach above, if it meets your use case, is a
better solution.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Replace pcksh with a modern shell, like bash?

A common approach is to implement Command Rewriting from pcksh to the preferred shell, i.e. bash. More details can be found in TID 7017938 - How to configure Direct-SSH on Linux using a preferred shell. This approach sets users default shell to pcksh for monitoring, auditing, full-session control, but Command Rewrite can be configured within PAM so that the actual execution in the user's session is within bash. So it appears to the user that they are within a bash shell, yet the benefits of PAM are still persisted.

Alternatively, there are likely ways we can explore in enhancing the pcksh shell so these features are also available there. For example, TID 7002630 - How to auto complete in a pcksh shell. Other sorts of modifications can be migrated over and configured in the /etc/profile.pcksh file. We may need to provide enhancements to enable these sorts of features by default, but they would likely come as default configurations within this file.
0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Replace pcksh with a modern shell, like bash?

Uncommenting the following line in the /etc/profile.pcksh brings the up/down previous/next command and perhaps some other features:
set -o emacs
0 Likes
edbarrag Absent Member.
Absent Member.

Re: Replace pcksh with a modern shell, like bash?

Hello,

Also had the problem of autocomplete and move between the command history, and is correct is resolved as follows as discussed:
* Adding in a shell pcksh "set -o emacs" and "bind ^ I = complete" when logging in.
or
* Adding to the /etc/profile.pcksh "set -o emacs" and "bind ^ I = complete" this on the server that contains the agent.

Currently the problem is that I have 1000 linux servers with NPAM, so the modification would have to do in each of the servers I can make some modification on the side of the manager or the rules to make it transparent to the end user.

And another doubt, there is some risk of adding "set -o emacs" and "bind ^ I = complete"

Regards!!
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.