Page 1 of 1

Can not connect to user with password with \c meta-command

Posted: Mon Jun 16, 2014 12:36 pm
by Julie
Hey,

I'm playing around with Vertica 7.0.1 and noticed a weird issue while trying to change users in vsql. If the user has a password, then Vertica does not ask for the password and presents an error.

If the user does not have a pw I can change to the user fine:

Code: Select all

dbadmin=> create user julie;
CREATE USER

dbadmin=> \c dbadmin julie;
You are now connected to database "dbadmin" as user "julie".

dbadmin=> \c dbadmin dbadmin
You are now connected to database "dbadmin" as user "dbadmin".

dbadmin=> drop user julie;
DROP USER
But if the user has a pw, I get an error!

Code: Select all

dbadmin=> create user julie identified by 'julie1';
CREATE USER

dbadmin=> \c dbadmin julie
FATAL 3781:  Invalid username or password
Previous connection kept
Odd :( In previous versions, didn't we get prompted for the password?

Re: Can not connect to user with password with \c meta-comma

Posted: Mon Jun 16, 2014 10:10 pm
by id10t
Hi!

[DELETED]

Re: Can not connect to user with password with \c meta-comma

Posted: Wed Jun 18, 2014 12:06 pm
by Julie
Thanks for getting back to me, sKwa. I tried the --no-vsqlrc option, no luck:

Code: Select all

[dbadmin@vertica-1 ~]$ vsql --no-vsqlrc
Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type:  \h or \? for help with vsql commands
       \g or terminate with semicolon to execute query
       \q to quit

dbadmin=> create user julie identified by 'julie1';
CREATE USER

dbadmin=> \c dbadmin julie
FATAL 3781:  Invalid username or password
Previous connection kept
dbadmin=>
It's weird, I can log on fine like this:

Code: Select all

[dbadmin@vertica-1 ~]$ vsql -U julie -w julie1
Welcome to vsql, the Vertica Analytic Database interactive terminal.

Type:  \h or \? for help with vsql commands
       \g or terminate with semicolon to execute query
       \q to quit

julie=>

Re: Can not connect to user with password with \c meta-comma

Posted: Wed Jun 18, 2014 1:36 pm
by id10t
Hi!

[DELETED]

Re: Can not connect to user with password with \c meta-comma

Posted: Thu Jun 19, 2014 2:16 pm
by Julie
sKwa, thanks for your help on this :)

Here is my output:

Code: Select all

[dbadmin@vertica-1 ~]$ vsql --version
vsql version 07.00.0100, built for Linux64, contains support for command-line editing
[dbadmin@vertica-1 ~]$ /opt/vertica/bin/vertica --version
Vertica Analytic Database v7.0.1-0
vertica(v7.0.1-0) built by release@build2.verticacorp.com from releases/VER_7_0_RELEASE_BUILD_1_0_20140212@130255 on 'Wed Feb 12 19:00:56 America/New_York 2014' $BuildId$

Re: Can not connect to user with password with \c meta-comma

Posted: Thu Jun 19, 2014 2:24 pm
by Julie
sKwa,

I think I may have figured something out. I am setting the VSQL_PASSWORD variable in the the dbadmin's users .bash_profile. If I comment that line out and then re-log in again, then when I launch vsql and attempt to swicth to the julie user, I am prompted for a password as expected! So, apparently when using the \c meta-command Vertica tries using the password from the VSQL_PASSWORD variable. That seems dumb. Do you think this is the issue?