LogonAccount with PSMP to targets using bash 5.1.8 (new bash version)
125
Created On 11/10/26 10:56 AM - Last Modified 11/10/26 15:56 PM
Symptom
On new versions of target Linux systems with bash 5.1.8, the root account password is not entered during the logon account login procedure.
The login is initially done with the pam_user (logon account user), the "exec su - root" command is executed, but at the root password entry prompt the password is not entered. The password prompt stays like this until a timeout and the session is closed.
A workaround for that:
Put the “bind 'set enable-bracketed-paste off' parameter in the .bashrc file.
*This parameter was introduced to disable the cut-and-paste of key commands due to security issues.
*If you enter this parameter on the target system the problem is solved, but obviously, this lowers the security.
The login is initially done with the pam_user (logon account user), the "exec su - root" command is executed, but at the root password entry prompt the password is not entered. The password prompt stays like this until a timeout and the session is closed.
A workaround for that:
Put the “bind 'set enable-bracketed-paste off' parameter in the .bashrc file.
*This parameter was introduced to disable the cut-and-paste of key commands due to security issues.
*If you enter this parameter on the target system the problem is solved, but obviously, this lowers the security.
Environment
12.6 Privileged Access Manager (PAM, self-hosted) PSMP PSMP with PuTTY
Cause
In a bash shell with the bracketed paste mode turned on, the sequence of characters used to disable it is automatically embedded before the "Password: " prompt (resulting in the line being read as "\e[?2004lPassword: ", where \e is a non-printable ASCII ESC symbol).
Bracketed paste mode does not disable the cut-and-paste of key commands.
It works by marking the start and beginning of a pasted text as a clue for an app handling the input. Anything else is at the discretion of a particular application receiving the input.
As far as we know bracketed paste feature was never related to security (but should be examined to evaluate the risk).
Bracketed paste mode does not disable the cut-and-paste of key commands.
It works by marking the start and beginning of a pasted text as a clue for an app handling the input. Anything else is at the discretion of a particular application receiving the input.
As far as we know bracketed paste feature was never related to security (but should be examined to evaluate the risk).
Resolution
The issue can be resolved by adapting the configuration.
This change causes the line to no longer match with the default regular expression in either AutoLogonSequenceWithLogonAccount or AutoLogonSequence used to detect the prompt.
You can modify your prompt to the following (assuming the default value was used before):
Add the following text at the start of the line with the word "Password":
(\e\[\?2004l)?
So the whole sequence should look similar to:
\[.*\@.* ~\]\$ >exec su - {Username}
(\e\[\?2004l)?Password:>{Password}
This change should make the login process work for shells with bracketed paste either enabled or disabled.
* Please make sure that ANSI escape sequences are taken under consideration in configurations interacting with the terminal's output.
This change causes the line to no longer match with the default regular expression in either AutoLogonSequenceWithLogonAccount or AutoLogonSequence used to detect the prompt.
You can modify your prompt to the following (assuming the default value was used before):
Add the following text at the start of the line with the word "Password":
(\e\[\?2004l)?
So the whole sequence should look similar to:
\[.*\@.* ~\]\$ >exec su - {Username}
(\e\[\?2004l)?Password:>{Password}
This change should make the login process work for shells with bracketed paste either enabled or disabled.
* Please make sure that ANSI escape sequences are taken under consideration in configurations interacting with the terminal's output.