Problem:
The error message “UNIX: Failed to detect shell prompt within the timeout value of X milliseconds.” appears when acquiring a Unix V2 endpoint.
Environment:
This endpoint is available on all versions of IDM.
Note: This connector installed with CA Identity Manager r12.6.3 and later. Should you be on an earlier version please reference the CA Identity Management & Governance Connectors wiki page for how to install the Unix V2 connector on your environment.
Link: https://docops.ca.com/ca-imag-connectors/1-0/EN/unix
Cause:
- A wrong value is specified for Shell Prompt on endpoint properties tab. This value is a regular expression. If the shell prompt is a dollar sign “$” followed by a space, then enter “\$( )” without quotes. The first backslash character is used to escape the dollar sign, which has special meaning in regular expression. Brackets enclose a space that follows.
!!IMPORTANT!!: Shell prompt pattern may be different for each user on the endpoint. Always verify this by connecting to the endpoint using an SSH client (ie. putty) as the admin user. 2. Another reason this could happen is due to an unresponsive or slow endpoint.
Resolution:
Execute the following command to determine the shell prompt.
Example:
\u is the user currently logged in.
\h is the host name.
and the \$ is the shell prompt.
How to modify shell prompt:
Log in as root:
vi /etc/profile
insert
export PS1="\$ "
Next acquire the endpoint with the following regexp: \$( )
Example information used to acquire endpoint:
Administrator root
Password ******
Operation Timeout 60
Shell Prompt (Regexp) \$( )
Create new user for connection:
useradd bob
cd /etc
passwd bob
vi /etc/sudoers
bob ALL=(ALL) ALL
Logon as bob:
vi ~/.bash_profile
export PS1="\$ "
Additional Information:
During attempt of "ssh YourUser@localhost":
If an error message is displayed that authenticity can not be established, this means you could have a ssl error. If you continue by typing yes you can Permanently add the RSA to the list of known hosts. You will then need to relogin.