Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get "no password supplied" error but cannot provide one #14203

Closed
qgib opened this issue Sep 4, 2011 · 8 comments
Closed

Get "no password supplied" error but cannot provide one #14203

qgib opened this issue Sep 4, 2011 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS High Priority

Comments

@qgib
Copy link
Contributor

qgib commented Sep 4, 2011

Author Name: Aren Cambre (Aren Cambre)
Original Redmine Issue: 4259
Affected QGIS version: master
Redmine category:grass


When I run GRASS's v.in.ogr.qgis via the GRASS plugin, I get this error:

*v.in.ogr -o "dsn=PG:dbname='de' host=localhost port=5432 user='postgres' sslmode=disable" "layer=raw.TxDOT crash" "where="Cnty_ID" = 57" output=pointdata snap=-1 min_area=0.0001
ERROR 1: PQconnectdb failed.
fe_sendauth: no password supplied

Unable to open data source
Finished with error*

The problem is there is no place to enter a password in the dialog.

I can only make a guess as to what's going on. I did not tell QGIS to remember the password for security reasons. But it shouldn't matter whether I check this--QGIS should remember the password for the duration of the session, right?



Related issue(s): #14893 (duplicates)
Redmine related issue(s): 5135


@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2011

Author Name: Aren Cambre (Aren Cambre)


Confirmed: when the DB connection is set to remember the password, GRASS has no problem. This seems like a problem when you're dealing with sensitive data; it's preferable to not have the password stored in clear text on the hard drive.

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2011

Author Name: Giovanni Manghi (@gioman)


Aren Cambre wrote:

Confirmed: when the DB connection is set to remember the password, GRASS has no problem. This seems like a problem when you're dealing with sensitive data; it's preferable to not have the password stored in clear text on the hard drive.

is this really a QGIS problem or a GRASS one? Did you try to import a Postgis vector into native GRASS?

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2011

Author Name: Paolo Cavallini (@pcav)


You have to define connection parameters to the DB before running the command.


  • status_id was changed from Open to Rejected
  • resolution was changed from to invalid

@qgib
Copy link
Contributor Author

qgib commented Sep 5, 2011

Author Name: Aren Cambre (Aren Cambre)


This is minimally a UI bug.

A user may decline to save the password in the connection if he doesn't want the password stored on clear text on the hard drive. This is is a valid measure to increase security. If this happens, QGIS prompts the user the first time the connection is accessed in the user session.

The UI problem is twofold:

  1. Nowhere in the UI does it tell me that I needed to save the password in the connection for GRASS to work.
  2. If I didn't save the password, I have no opportunity to re-enter a password.

And I don't think it's a UI problem. Even if I don't save the password in the connection, QGIS does know the password for the duration of the QGIS session. How do I know? After I type in a password for the first time, all subsequent accesses to the same connection don't re-prompt me for the password. So if QGIS "remembers" the password for the user session, why can't it share it with GRASS when it fires off a GRASS module?


  • resolution was changed from invalid to

@qgib
Copy link
Contributor Author

qgib commented Sep 5, 2011

Author Name: Paolo Cavallini (@pcav)


GRASS does not use, by design, QGIS connection. Please read GRASS docs.


  • resolution was changed from to invalid

@qgib
Copy link
Contributor Author

qgib commented Sep 5, 2011

Author Name: Aren Cambre (Aren Cambre)


I understand. QGIS constructs a connection string for GRASS, which is passed to GRASS in the command line.

That's not the issue.

The problem is if I don't check Save Password in the Create a New PostGIS connection dialog (what you get after hitting New or Edit in the Add PostGIS Table dialog) in QGIS when setting up a connection--way before I can even think about doing anything with GRASS--then QGIS declines to provide the password to GRASS.

Why does does saving the password have anything to do with whether QGIS provides the password to GRASS? There is no logical connection between the two, hence it's unintuitive. It's not explained anywhere in the UI.

QGIS should do one of:

  1. Provide the password to GRASS even if it's not saved in the connection. QGIS does know the password if I've opened the PostGIS layer upon which I want it to operate. QGIS prompted me for a password when I opened the layer. See the attached image.
  2. When I invoke a GRASS module and I didn't save the password in the connection file, allow me the opportunity to specify a password instead of just causing an error.
  3. At least inform me of the problem, that QGIS can't give GRASS the password because QGIS needs me to save the password in the connection before invoking grass.

If you keep this as invalid, you're saying that:

  1. Only the least secure state for password management is valid for interacting with GRASS.
  2. The UI is not going to tell anyone about this, nor will it allow the user to provide a password to GRASS, forcing more secure users to play a large guessing game every time they invoke GRASS.

  • 3416 was configured as posrgresConnection.png
  • resolution was changed from invalid to

@qgib
Copy link
Contributor Author

qgib commented Feb 18, 2012

Author Name: Aren Cambre (Aren Cambre)


Any chance this can be reconsidered? At a minimum, the UI could be improved to make this more clear to users.


  • version was configured as master
  • crashes_corrupts_data was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Feb 20, 2012

Author Name: Jürgen Fischer (@jef-n)


  • resolution was changed from to fixed
  • status_id was changed from Rejected to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority GRASS labels May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS High Priority
Projects
None yet
Development

No branches or pull requests

1 participant