RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1440256 - gvfs will not mount sftp resources if password prompt is different
Summary: gvfs will not mount sftp resources if password prompt is different
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gvfs
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Ondrej Holy
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-07 17:03 UTC by Deepu K S
Modified: 2020-09-10 10:26 UTC (History)
5 users (show)

Fixed In Version: gvfs-1.30.4-3.el7
Doc Type: Bug Fix
Doc Text:
Cause: RSA Agent uses custom password prompt for SecurID authentication. Consequence: SFTP connection using GVfs fails when mounting (e.g. in Nautilus) with the following error: "Timed out when logging in". Fix: The custom password prompt "Enter PASSCODE:" is now recognized by SFTP backend. Result: SFTP shares with SecurID authentication can be successfully mounted by GVfs.
Clone Of:
Environment:
Last Closed: 2017-08-01 21:28:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to add password prompt for RSA SecurID authentication (696 bytes, patch)
2017-04-07 17:06 UTC, Deepu K S
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2137 0 normal SHIPPED_LIVE nautilus bug fix and enhancement update 2017-08-01 18:39:16 UTC

Description Deepu K S 2017-04-07 17:03:29 UTC
Description of problem:
When using RSA Agent for PAM to allow SecurID authentication (pam module pam_securid.so), gvfs-mount fails.
When attempting to mount remote paths via sftp using gvfs (e.g. in Nautilus) it times out at the password prompt on the remote ssh sever. 

$ date; gvfs-mount sftp://user01@host02; date
Thu Mar 30 12:21:54 UTC 2017
Error mounting location: Timed out when logging in
Thu Mar 30 12:22:34 UTC 2017

It appears that gvfs waits for below prompt strings to match.

gvfs-1.22.4/daemon/gvfsbackendsftp.c

if (g_str_has_suffix (buffer, "password: ") ||
          g_str_has_suffix (buffer, "Password: ") ||
          g_str_has_suffix (buffer, "Password:")  ||
          g_str_has_prefix (buffer, "Password for ") ||
          g_str_has_prefix (buffer, "Enter Kerberos password") ||
          g_str_has_prefix (buffer, "Enter passphrase for key"))
        {

whereas RSA Agent's password prompt string is "Enter PASSCODE:"

Same is in upstream : https://git.gnome.org/browse/gvfs/tree/daemon/gvfsbackendsftp.c?h=gnome-3-14#n931

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 7.2
gvfs-1.22.4-8.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. gvfs-mount sftp://user01@host02
2.
3.

Actual results:
$ date; gvfs-mount sftp://user01@host02; date
Thu Mar 30 12:21:54 UTC 2017
Error mounting location: Timed out when logging in
Thu Mar 30 12:22:34 UTC 2017

If the password prompt does not match any of defined, it will time out and fail as shown above.

Expected results:
Add a check to include "Enter PASSCODE:"

+	  g_str_has_prefix (buffer, "Enter PASSCODE:"))

Additional info:

Comment 2 Deepu K S 2017-04-07 17:06:48 UTC
Created attachment 1269837 [details]
Patch to add password prompt for RSA SecurID authentication

Comment 3 Deepu K S 2017-04-07 17:08:50 UTC
It is confirmed that with above patch, we can mount sftp resources via gvfs-mount and Nautilus when the remote prompt is "Enter PASSCODE:" without any timeouts.

Comment 4 Ondrej Holy 2017-04-10 09:50:30 UTC
Thanks for the patch, I've pushed it upstream:
https://git.gnome.org/browse/gvfs/commit/?id=b64149c3fc292c1763c3f0056d6a8081e2ce0810

Comment 9 Bohdan Milar 2017-06-15 13:00:14 UTC
SanityOnly because SecurID is not available (non-free license).

Comment 10 errata-xmlrpc 2017-08-01 21:28:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2137


Note You need to log in before you can comment on or make changes to this bug.