passwords

username, password program in bash

▼魔方 西西 提交于 2020-01-04 03:57:09
问题 I have a program that asks input from user on their username and password then stores it in a text file column one is usernames and column 2 is passwords, i need a command that replaces the password when the user inputs their username and new password, heres what i have #!/bin/bash #admin menu #Register User echo enter the username of the user you want to register. read reguser echo enter the password of the user you want to register. read regpass User_Pass="username_pass.txt" if [ ! -e "

Active Directory [closed]

瘦欲@ 提交于 2020-01-03 18:44:43
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . How can i get the password for a user from Active Directory 回答1: Simple, you cannot. Passwords are not stored in nearly all authentication systems. Instead, they are converted into a 'hash' that is stored instead. Then, when you want to prove that you know the password, you convert the password you type into a

Is it a security risk to use parts of GUID as a random passwords?

安稳与你 提交于 2020-01-03 17:49:12
问题 When users create an account in my web application, I generate a GUID and use the first 8 characters as their password which is then sent via email. Is there a security risk I am overlooking in using GUIDs as passwords? I've taken a look at the questionAre GUIDs good passwords?, but that question pertains to personal passwords not random/generated passwords. Ideally, users will login and change their password if they want to. 回答1: Using GUID s as passwords is a very bad idea. GUID s are

How to convert text to phpbb hash?

烂漫一生 提交于 2020-01-03 17:05:10
问题 I am trying to convert a test password (testing4) into a phpbb3 hash. This is the code I have tried: <?php /** * * @package phpBB3 * @version $Id: v3_dbal.xml 44 2007-07-25 11:06:55Z smithy_dll $ * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** * @ignore */ define('IN_PHPBB', true); include ("functions_phpbb.php"); $data['new_password'] = "testing4"; $user_row = array( 'user_password' => phpbb_hash($data['new_password']) )

Does salt need to be random to secure a password hash?

房东的猫 提交于 2020-01-03 08:32:30
问题 I know very little about security (I need to find a basic explanation of the basics) and am trying to come up with a reasonable way to store user passwords in a database using .Net. Here's my current solution: private static byte[] HashPassword(string password) { using (var deriveBytes = new Rfc2898DeriveBytes(password, 10)) { byte[] salt = deriveBytes.Salt; byte[] key = deriveBytes.GetBytes(20); return salt.Concat(key).ToArray(); //Return Salt+Key } } I store the results of HashPassword() in

Python: Execute scp, stdin for password not working

☆樱花仙子☆ 提交于 2020-01-03 03:34:14
问题 I'm trying the following from subprocess import Popen, PIPE Popen(["scp", "-B","user@url:file", "."], stdin=PIPE, shell=False).communicate(input="password") But I still get the password promt, and no password is sent. I know I can use scp with keys, but this is not what I need. Any help? 回答1: scp interacts with the terminal directly, rather than reading from STDIN , You can't pass the password via a pipe, it security matter for scp and it's the same for sftp, ssh. you can try it in you

Cannot reset mysql password as root

╄→尐↘猪︶ㄣ 提交于 2020-01-03 02:54:15
问题 i am using CentOs with mysql 5 version, forgot my password, and i cannot reset it, what i did is /etc/init.d/mysqld stop mysqld_safe --skip-grant-tables & mysql -u root mysql> update mysql.user set password=PASSWORD("pass") where User='root'; got this message Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> flush privileges; exit; Query OK, 0 rows affected (0.00 sec) Stopped and strated mysql but its anyway ERROR 1045 (28000): Access denied for user 'root'@

Encrypt and Decrypt password

风流意气都作罢 提交于 2020-01-03 02:49:05
问题 I am using the following code to encrypt and decrypt passwords in asp.net. the encryption works perfectly but when decrypting it throws this error Invalid length for a Base-64 char array. my password is 123 and i am using it as follow to encrypt: HttpUtility.UrlEncode(CryptorEngine.Encrypt(strpassword, true)); and to decrypt I am using it as follow : CryptorEngine.Decrypt(HttpUtility.UrlDecode(strpassword), true)); and here is the code : public class CryptorEngine { /// <summary> /// Encrypt

Password Reset Link Expiry

二次信任 提交于 2020-01-02 10:24:17
问题 I wonder whether someone could help me please. I've been doing quite a bit of research on the 'Password Reset' process and from one of the tutorials I found, I've been able to put the following code together which provides this functionality. Forgot Password <?php // Connect to MySQL $c = mysql_connect("host", "user", "password"); mysql_select_db("database", $c); // Was the form submitted? if ($_POST["ForgotPasswordForm"]) { // Harvest submitted e-mail address $emailaddress = mysql_real

Password Reset Link Expiry

此生再无相见时 提交于 2020-01-02 10:24:09
问题 I wonder whether someone could help me please. I've been doing quite a bit of research on the 'Password Reset' process and from one of the tutorials I found, I've been able to put the following code together which provides this functionality. Forgot Password <?php // Connect to MySQL $c = mysql_connect("host", "user", "password"); mysql_select_db("database", $c); // Was the form submitted? if ($_POST["ForgotPasswordForm"]) { // Harvest submitted e-mail address $emailaddress = mysql_real