Mysql Password() & Unix Crypt Password...
I am creating a user administration system where system administrator
can activate services for a user, like webspace, a mail account or a
subdomain.
I now want to create a function that creates mysql databases and grant
the right privileges to a user. But the problem is that mysql wants to
have the plaintext password for the user in the "grant ... identified by
'pwd'" field, or in a manual query to update the password in the
mysql.user table with PASSWORD('pwd').
I have another database which holds the passwords for the users, these
password are stored the moment a user signs up and are used to activate
services, for example ssh access to the machine. The stored passwords
are encrypted using crypt(). So for adding a ssh service to a user, I
simply do echo "$user:$pwdhash" | chpasswd -e.
I have chosen crypt because some programs (like proftpd) don't take md5
sums.
The problems is that I don't have the plaintext password. So I cannot
add a mysql db.
So I need to create a user in mysql with a crypt password.
I tried to just "grant all privileges ... identified by 'nothing'"
and then afterwards update the mysql.user table and putt the crypt
password in there but it doesn't work like that.
Does anyone have any idea on how I could fix this, how can I create a
user in mysql without having his plaintext password and only having a
crypt hash of it.
I thought about not only storing a crypt hash, but also an md5 hash and
a mysql PASSWORD() hash.. but I think that's an ugly solution.
View Complete Forum Thread with Replies
Related Forum Messages:
Random Password Vs. User Created Password For Site Login
Are there any security issues or other concerns that make one preferable? The client is pushing for user created passwords. I'm mapping out the basic functionality and front-end for a MySQL/PHP back-end that will be completed by a third party. I'm a novice to MySQL but familiar with PHP and their interaction. Mainly looking for anything to support one method over the other.
View Replies !
I Can Connect With Db Password Or Blank Password
I have a password setup for root (% and localhost) in Mysql 5.0.26, I can connect ok no problem. I can also connect with blank password! I know it is checking the password cuz it fails if it's wrong. I'm sure I have only one account as well (tried to delete, recreate, etc... no change) select * from user where user='root'; | localhost | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ... | % | root | *F3AD8B3C44772C17F66767F29D948D9C255BD824 | Y ... Is there an option to accept blank password!? I have this problem only for root user; Other accounts are fine.
View Replies !
Password :: Change Password
I have trixbox 1.2.3 running and in freePBX it told me I need to change the password in mysql. I went into mysqladmin and privileges. I updated the passwords for a2billinguser and root. Now I am denied from access to mysql and all services that use mysql don't work. How do I restore the default that trixbox used. I have a very large major system here and cannot just blow it away.
View Replies !
MySQL PASSWORD()
I have a field in my db that I assign a password() function so that when it is sent in from a browser form, i do "select userID, name, password from users where userID=$userID and password=password($password)"... this is just an example, but wondering what mysql uses to encrypt it.would it be better off to just use php's mcrypt or crypt myself? would that be more secure?
View Replies !
Cannot Set MySQL Password On My Mac
I had an old version of MySql on my Mac. I recently installed the latest version of MySql. I tried to set a password in terminal using the steps shown below, but I get the error message shown below. I don't remember the password for my previous MySQL installation. Welcome to Darwin! localhost:~ helpprob% alias mysql=/usr/local/mysql/bin/mysql localhost:~ helpprob% mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) I have also tried: mysqladmin -password <new password> and the same command without the dash before "password." I have also tried searching the MySQL manual and have tried various things that I thought it was recommending, to no avail. In some variations of what I have tried, I get the same error message except the end reads, "password: YES)
View Replies !
Password For Mysql
I have running 4.0.15 on my server but when I access het database on a external network i dont have to fill in NO password. So everybody can mesh up my database. Can anybody tell me how I must handel so that i can set a password for my database.
View Replies !
Using Password In Mysql
I used the below query for setting password. SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd'); After using it I cannot enter into mysql. When I entered mysql.exe, it is not going inside. But when I use mysql.exe -u root, its going inside. I don't know where the password was actually set.
View Replies !
MySQL Password Problem
I installed a new application and it over wrote my passwords.I can not get back in to mysql.Someone suggested there is a way to set the password without knowing the old password.
View Replies !
MYSQL Password Accounts
I have been having problems with password accounts in MySQL. I'm setting up the environment for the first time. from the mysql website the intructions are to set the password on Windows: shell> mysql -u root mysql>SET password ......... My question is where do i access "shell>" to start off the code I have little expreience in writing in the command window so I do apologise if this question is overly remedial
View Replies !
MySQL Password Unknown
Unsure what to do next. 1. Apache running in task bar. 2. PHP info function brought expected results. 3. Clicking on MySQL Command Line Client brings up a DOS box that says: Enter password: When typing either the only password I would have used upon installing OR using nothing and pressing ENTER, the box disappears with a loud computer default beep, then nothing.
View Replies !
Cannot Connect To MySQL Using Password.
username: userx host: % password: 1111 (with full privilege) # mysql -uuserx -p after entering the password, I fail to connect to the server. I cannot connect to Mysql server with the client application either. If I delete the password, I CAN connect to it with both mysql and client application.
View Replies !
Default Password Set In Mysql
Can any one tell me if there is a default password set in mysql when installing it. I am sure that i did not give any password while installation process. To confirm it i installed it many times and different versions as well. I am having following error message: ERROR 1045: Access denied for user: 'ODBC@localhost' (Using password: NO)
View Replies !
How Do I Connect To MySql Without Password
I have given a password to root user. But I want to connect to the databases in the MySql without password during development. How do I do that? I am asking this question because I am having the following problem when I tried to connect thru php : Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: NO) in C:Program FilesApache GroupApachehtdocs estmysql.php on line 5 connect error: Access denied for user 'root'@'localhost' (using password: NO) My php code: mysql_connect("localhost", "root") or die("connect error: ".mysql_error());
View Replies !
How To Set Up An Admin Password On OS X For MySQL?
I use to use Complete MySQL, I decided to use MySQL from here, just do to the fact of the major bug that C.MySQL contains now... But the problem I am finding with the documentation is that it doesn't explain in OS X, how to create the admin account, and how to give it a password as well..
View Replies !
Setting Up The MySQL Password
I can't seem to see the page whan I am trying to set up the 'Setting Up the MySQL Password'. I know this is right at the start but all I get when I type in the Web browser http://127.0.0.1/myadmin is the sourcecode and not the actual log in page... I know it's something silly I have done or not done (I have installed the Apache / MySQL / PHP stuff over and over again, but it still does the same thing to me. The Apache services is running fine. The WinMySQLadmin is on green so I know that's fine. I think it's maybe an explorer thing? but I can't seem to get it.
View Replies !
MySQL Administrator Password
I have just installed mySQL 5 Community Edition and also all its tools viz. Administrator, Migration etc.. Presently I have installed it on a machines with no other machines connected to it. I also selected "Developer Machine" option while installing it. When I open mySQL Administrator, it asks for Username and Password. I remember the password, but what is the default Username and Schema Name. If I am running on a standalone machine, what to type in "Server Host" in the administrator window.
View Replies !
Password Decryption In MySQL
I am having a problem with the password storing in mySQL. It is something like this . I have a form for my user to change their password and in that form there is an input field called old_password . And in the database the password i stored were all encrypted with the function PASSWORD() in MySql ,so the problem is that i could not make a comparision between the $$old_password and the encrypted password in the database bacause i haven't known the function to decrypt the password in the mySQL database .
View Replies !
Password Protection Using MySQL
i posted a md5 question on another thread which turned into a MySQL question, so i thought i'll post it in here. I am new to this PHP MySQL thing, but i wanted to create a fairly secure login area. Could someone explain to me on how to do this? Also, i have myPHPadmin, but i'm not too certin on how to create tables and put the stuff in it too.
View Replies !
Changing MySQL Password
I am trying to learn MySQL and I don't have a clue what my username and password is. I am on win98. I had installed MySQL awhile back and tried re-installing it, but it skips the password / username part. I assume there must be a file I can change in notepad.
View Replies !
MySQL Root Password
I am having some trouble setting up the mySQL root password. It's probably right under my nose, but I can't seem to find where to edit it.
View Replies !
Got Locked Out Of Mysql. Won't Take My Password
Running MySQL5/PHP5/Apache2 on Windows XP Pro. I setup my root password yesterday: mysql>UPDATE mysql.user SET Password=PASSWORD("new password") WHERE User="root"; Query OK, 2 rows affected (0.12 sec) Rows matched: 3 Changed: 3 Warnings: 0 mysql>FLUSH PRIVILEGES; Query OK, 0 rows affected (0.24 sec) Then, I was successfully able to logon to mysql as root. Today, when I rebooted the computer and tried to logon: mysql -h localhost -u root -p I got the following: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I verified that mysqld-nt.exe was running as a process. I suppose I could have done the steps incorrectly(as a newbie) but is there an easy way to proceed.
View Replies !
Mysql Service And Root Password (-w W)
I have a few qeustions for some linux/mysql pros in here. Background: I've just built MySQL on Mandrake Linux 9.1 from source. I can get the mysql service running my: shell> /usr/local/mysql/bin/mysqld_safe --user=mysql & but I don't know how to keep it running, or how to make it start at every bootup. How do I do that? Also, I've made an alias to mysql: alias=/usr/local/mysql/bin/mysql but it won't span sessions, I think I need to export it, but I'm not sure how to. Also, via mysqladmin I set the root password to "password" which I don't want to keep :) how do I got about changeing it now? I know I probably should have installed via RPM, but I'm wanting to learn as much as I can about all of this.
View Replies !
How To Encrypt Password In MySQL Database?
i would like to ask thing son encryption of data presently i'm setting up a mysql database to store usernames and password for authentication is there ways i can encrypt the column passwords even to the database administrator? i know of MD5 but how do i actually go about doing it?
View Replies !
Root Password :: Cannot Login To Mysql
i am new to mysql.i have installed mysql software which is provided with Linux CD .i need to provide password to root.i updated the user table to give password to the root.after restarting the mysqld service , i couldnt enter into mysql .one error message is displaying ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
View Replies !
Mysql.user.password In Session
I have set up a few users in the mysql Privileges and with my php pages I have them log in with a form (login.php) to access the next page (mainpage1.php) that generates info from the mysql db.I know it is not really secure to just have the plain text password stored as a $_SESSION['pw'] as I have now. but how should I store it in a Session to be used in other pages without the user having to enter it in each time the page wants to go to the db? Or can we store the $Link in a session? or somehow have it remember that the user is connected?as if I sha1() the password how do I get it back into a format that mysql recognizes?What is the best way of doing this?
View Replies !
Users With A Password Cant Access Mysql
Guys im having a problem with my MySQL 4.1.7 installed in Slackware 10.0 Users without password can access the databases without any problems, including root and others. When i grant a password to an user like root, he losts completly the access to mysql. Why is this happening ? How can i solve it ?
View Replies !
View Mysql Users Password
How can i view a mysql users account's password, i have got all privileges so it should be possible? When i have a look in the mysql table the passwords are coded.
View Replies !
MySQL Password Hash Location
I'm running MySQL v.4.0 and and on my webserver and I have PHP Nuke installed. For the PHP Nuke system to run, it requires the db username and the db password. However, I can't use the text version of my db password, because my password actually gets hashed, and that's what is required by PHP Nuke. When I first installed the Nuke, I was able to locate my password hash, but it's been so long that I actually have no clue as to where I was able to locate it. I would change the database user password back to what it was...if only I could remember what it was. So, reverting it back to it's previous password doesn't look like it's going to be an option. So, basically...all I need is to find out where in the heck I can locate the hash for my db user password
View Replies !
Setting Password For MySQL From WAMP?
A few months back I installed WAMP (one big installation of Apache, MySQL and PHP for Windows). The last week I'm busy with Portal development. As a result I'm trying to install Jetspeed-2. The installer of Jetspeed asked what Database I would like to use. As I installed WAMP I thought it wiser to stick to MySQL. When I started phpMyAdmin I saw the following message: "Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account." As it is some time since I installed WAMP I cannot remember what I need to do. I searched the install directory and found that the word password is contained in several .ini files (my-huge.ini, my-innodb-heavy-4G.ini, my-large.ini, my-medium.inim and my-small.ini, but not in my.ini). The format of the line is: #password= your_password I take it I need to remove the # at the start of the line, replace 'your_password' with a password of my choosing? But in what ini file? How does WAMP know what ini file to choose? In the same directory as the ini files I see a wampserver.conf file. In it there is an entry: $mysqlConf['mysqlConfFile'] = 'my.ini'; Does this entry make WAMP to choose for my.ini? I plan to use the WAMP/MySQL installation purely for development purposes.
View Replies !
MySQL Administrator - Password Storage
I am scheduling backups using MySQL Administrator and have to set the Password Storage options for it to work. What I am wondering is how does the 'OS Specific' password storage method work? Are any of these password storage methods secure? If not, how else can I automatically backup the server?
View Replies !
RESET Password Of Mysql On Mac OS Server
Can somebody help me reset the password on mysql ? I need the commands to force the change cause I can't login to mysql. I am using mac os server 10.3.9 and I have messed up the mysql password I have full access priviliges on the mac server.
View Replies !
Change MySQL Root Password
My current user/pswd for my localhost is root/"" (no password). I'm following the directions in the mysql command line window (im on windows and installed mysql via wamp) and can't get to change the darn thing.
View Replies !
PHP Md5 Not Same As Mysql Md5 Password-whats Wrong?
I made a user/login system that uses MD5 security for the passwords. When the person logs in, the password they enter in the html form is encrypted with md5 security and is set to match the password in the database. Here's a quick example. //collect the post data $username = $_POST['username']; $password = $_POST['password']; $password2 = md5($password); //TEST TO SEE IF THE ENCRYPTED PASSWORD MATCHES IN THE DB, WHICH IT DON'T! echo $password2; $sql="SELECT * FROM members WHERE username='$username' AND password='$password2'"; $result=mysql_query($sql); if(mysql_num_rows($result)==0) { echo("Wrong username and/or password. Please try again."); } else { echo("Login Successful! Please wait..."); } What is wrong here? I tried various methods of placement of the MD5 function in the registration and the password that is being entered in the database is always the same, but the one from the form never matches.
View Replies !
Making Mysql Username And Password
im setting up phpAdsNew and they ask for my database (mysql) username and password... i go to google and search on how to create usernames and passwords and i choose the link on mysql.com... it tells me to do this: GRANT ALL PRIVILEGES ON database TO 'username'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION; i do that and all goes well...i go back to the installing of phpAdsNew and put in the username and password i made... it still doesnt work... so could someone tell me if thats how to make a username and password in mysql or if there is something wrong with phpAdsNew... and i'm using the mysql command line client to put the code in...just incase you need to know that.
View Replies !
Lost Password For MySQL Table....
I need the DBPASS for one of my MySQL databases. Unfortunatly I made it a while ago and never thought i would need to know the password. Im not sure what the password is.... Ive got two options: 1. find out the old password 2. reset the password to another password but the problem is then i need to tell the forum (invision power board) that the password has changed. If anyone knows how to change the DBPASS on invision power board,
View Replies !
|