passwords

Java Play Encrypt Database Password

大憨熊 提交于 2019-12-02 17:32:37
问题 I'm developing a Java Play application and I'm storing the Database password in plain text inside the application.conf file. db.default.url="jdbc:oracle:thin:@HOST:PORT/SID" db.default.user=USER db.default.pass=PW Now i want to store it as an encrypted password. While searching for a solution I saw many articals about implementing a plugin. Following is an solution I came across. Encrypting db password in application.conf In that example, play.PlayPlugin is used but when I try it, I get an

PDO Register and Login Password Matching

 ̄綄美尐妖づ 提交于 2019-12-02 17:10:57
问题 Okay.. so to start off I only have Php 5.3 so I can't use bcrypt, I am not familiar with salt but an completely willing to do it if someone can help me out. I also would like to know if this script is bad or good for sql injections. My biggest problems is when I use something like crypt and try to get my passwords to match, it won't. I've been working on this for days and can't seem to find the right solution to my problem. the code is not done yet, but its able to run. I'm just doing this on

Default password of mysql in ubuntu server 16.04

我的未来我决定 提交于 2019-12-02 17:04:10
I have installed ubuntu 16.04 server. Mysql server was installed by default in it. When I am trying to access the mysql with mysql -u root -p , I am unable to log in to mysql because I dont have the password. Is there any default password? I have also tried with --skip-grant-tables , even this does not work. Even trying to log in with just mysql -u root is a failure. This is what you are looking for: sudo mysql --defaults-file=/etc/mysql/debian.cnf MySql on Debian-base Linux usually use a configuration file with the credentials. Harper Mysql by default has root user's authentication plugin as

Inserting new password by overriding old password

喜你入骨 提交于 2019-12-02 16:50:19
问题 In yii i am creating project. After validation of user's entered email, i am displaying password.php file which is having textfield for entering new password. Password.php= <?php $form=$this->beginWidget('CActiveForm', array( 'id'=>'email-form', 'enableClientValidation'=>true, )); echo CHtml::textField('Enter new password'); echo CHtml::textField('Repeat password'); echo CHtml::submitButton('Submit'); $this->endWidget(); When user will enter new password and click on submit button i want to

Updating `User` attributes without requiring password

安稳与你 提交于 2019-12-02 16:40:09
Right now, users can edit some their attributes without having to enter their password because my validations are set up like this: validates :password, :presence =>true, :confirmation => true, :length => { :within => 6..40 }, :on => :create validates :password, :confirmation => true, :length => { :within => 6..40 }, :on => :update, :unless => lambda{ |user| user.password.blank? } However, after a user does this, their password is deleted - update_attributes is updating their password to "". Here is my update definition: def update if @user.update_attributes(params[:user]) flash[:success] =

Best practice on generating reset password tokens

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 16:19:32
Any best practice on how a reset password token should be constructed? I'm thinking: random 17 characters [a-zA-Z0-9] + a globally unique id + random 17 characters [a-zA-Z0-9]. Is there a better solution, or an industry standard on reset password tokens? martinstoeckli There are some important points to consider. The code should be really random (read from MCRYPT_DEV_URANDOM), and should not be derrived from other user related information. Ideally the code is base62 encoded (A-Z a-z 0-9) to avoid problems with the Url. Store only a hash of the token in the database , otherwise an attacker with

SALT and HASH using pbkdf2

折月煮酒 提交于 2019-12-02 16:18:57
I am using the following methods to create a salted and hashed password from the crypto lib in nodejs: crypto.randomBytes(size, [callback]) crypto.pbkdf2(password, salt, iterations, keylen, callback) For the randomBytes call (creating the SALT) what size should I use? I have heard 128-bit salts, maybe up to 256-bit. It looks like this function uses a size in bytes so can I assume a size of 32 (256 bits) is sufficient? For the pbkdf2 call, what is a good number of iterations and what is a good length for the key (keylen)? Also, for storage I have seen examples of storing the salt, length,

SVN encrypted password store

Deadly 提交于 2019-12-02 16:02:18
I installed SVN on a Ubuntu machine and I can't get my head around something. Whenever I checkout something from the terminal I get this error about saving a non-encrypted password: ----------------------------------------------------------------------- ATTENTION! Your password for authentication realm: <[...]> Subversion Repository can only be stored to disk unencrypted! You are advised to configure your system so that Subversion can store passwords encrypted, if possible. See the documentation for details. You can avoid future appearances of this warning by setting the value of the 'store

How do you generate passwords? [closed]

旧时模样 提交于 2019-12-02 15:10:38
How do you generate passwords? Random Characters? Passphrases? High Ascii? Something like this? cat /dev/urandom | strings Mac OS X's "Keychain Access" application gives you access to the nice OS X password generator. Hit command-N and click the key icon. You get to choose password style (memorable, numeric, alphanumeric, random, FIPS-181) and choose the length. It also warns you about weak passwords. Arul S Use this & thumps up :) cat /dev/urandom | tr -dc 'a-zA-Z0-9-!@#$%^&*()_+~' | fold -w 10 | head -n 1 Change the head count to generate number of passwords. A short python script to

What is a good way to produce a random “site salt” to be used in creating password retrieval tokens?

混江龙づ霸主 提交于 2019-12-02 14:58:10
I would like to create a site-wide hash to be used as salt in creating password retrieval tokens. I have been bouncing around stackoverflow trying to get a sense of the best way to do this. Here's the reset process: When a user requests a password reset email the code generates a retrieval token: $token = hash_hmac('sha256', $reset_hash* , $site_hash) *$reset_hash is a hash created using phpass HashPassword() function, saved in the user table. I then send the token in a URL to the users email address. They click before the token times out in an hour. I match their submission with the a