Reset Password
Moderator: NorbertKrupa
Reset Password
Is there any way to change a database's password?
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Reset Password
Hi,
You can change a user's password in the Vertica database using the ALTER USER statement:
Example:
Logged in as the admin, I'll create a user jim and then log in as the user jim:
Now that I am logged in as user jim, I can change the password with the ALTER USER command but I have to also supply the old password to do so.
Like this:
If you are logged in as an admin. you can change the password for any user without supplying the old password.
Like this:
You can change a user's password in the Vertica database using the ALTER USER statement:
Example:
Logged in as the admin, I'll create a user jim and then log in as the user jim:
Code: Select all
dbadmin=> create user jim identified by 'pluto';
CREATE USER
dbadmin=> \q
bash-3.2$ vsql -U jim -w pluto
SET
Welcome to vsql, the Vertica Analytic Database v5.0.11-0 interactive terminal.
Type: \h for help with SQL commands
\? for help with vsql commands
\g or terminate with semicolon to execute query
\q to quit
jim=>
Like this:
Code: Select all
jim=> alter user jim identified by 'venus' replace 'pluto';
ALTER USER
Like this:
Code: Select all
dbadmin=> alter user jim identified by 'mars';
ALTER USER
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: Reset Password
Thanks Jim, but I'm actually trying to change the DATABASE password, not a user password. Any ideas?
-
- Intermediate
- Posts: 149
- Joined: Mon Apr 30, 2012 10:04 pm
- Location: New York
- Contact:
Re: Reset Password
There are only user passwords - no database level password.
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Reset Password
I believe that the "database password" is simply the database superuser's password.
If your superuser account is dbadmin, just use the ALTER USER statement:
If your superuser account is dbadmin, just use the ALTER USER statement:
Code: Select all
ALTER USER dbadmin IDENTIFIED BY 'newpassword';
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Re: Reset Password
But how would I log into the database without this password?
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Reset Password
Did you forget the password?
You may be able to edit the vertica.conf file and change the client authentication to trust. By doing so you should be able to run vsql without a password because the OS has already authenticated the user (assuming you can get that far ).
Please check out the "Implementing Client Authentication" of the Administrator's Guide on page 106.
I'd be careful to make backups prior to modifying any files!
You may be able to edit the vertica.conf file and change the client authentication to trust. By doing so you should be able to run vsql without a password because the OS has already authenticated the user (assuming you can get that far ).
Please check out the "Implementing Client Authentication" of the Administrator's Guide on page 106.
Keep in mind that Vertica recommends not editing the vertica.conf file manually. It should be edited via the admintools.trust — Authenticates clients based on valid user names only. You might want to implement trust if a user connection has already been authenticated through some external means such as SSL or a fire wall.
I'd be careful to make backups prior to modifying any files!
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.