passwords

How to pass the password to su/sudo/ssh without overriding the TTY?

為{幸葍}努か 提交于 2019-12-16 20:19:12
问题 I'm writing a C Shell program that will be doing su or sudo or ssh . They all want their passwords in console input (the TTY) rather than stdin or the command line. Does anybody know a solution? Setting up password-less sudo is not an option. expect could be an option, but it's not present on my stripped-down system. 回答1: For sudo there is a -S option for accepting the password from standard input. Here is the man entry: -S The -S (stdin) option causes sudo to read the password from the

Salting Your Password: Best Practices?

倖福魔咒の 提交于 2019-12-16 20:14:24
问题 I've always been curious... Which is better when salting a password for hashing: prefix, or postfix? Why? Or does it matter, so long as you salt? To explain: We all (hopefully) know by now that we should salt a password before we hash it for storage in the database [ Edit: So you can avoid things like what happened to Jeff Atwood recently]. Typically this is done by concatenating the salt with the password before passing it through the hashing algorithm. But the examples vary... Some examples

Salting Your Password: Best Practices?

限于喜欢 提交于 2019-12-16 20:13:49
问题 I've always been curious... Which is better when salting a password for hashing: prefix, or postfix? Why? Or does it matter, so long as you salt? To explain: We all (hopefully) know by now that we should salt a password before we hash it for storage in the database [ Edit: So you can avoid things like what happened to Jeff Atwood recently]. Typically this is done by concatenating the salt with the password before passing it through the hashing algorithm. But the examples vary... Some examples

Can salt prevent dictionary or brute force attacks?

淺唱寂寞╮ 提交于 2019-12-14 03:56:20
问题 I just read an article. And it's said: So I’m not saying salts are without purpose, I’m saying that they don’t prevent dictionary or brute force attacks (which they don’t). If you have a database dump, with hashed passwords and salts, you can start brute force only if you know crypt algorithm. If you use open source, it can be a problem. But if you change algorithm a little, it's not a problem, until somebody know it. Am I right? 回答1: Troy Hunt recently wrote an excellent article, Our

I18n and Passwords that aren't US-ASCII, Latin1, or Win1252

最后都变了- 提交于 2019-12-14 03:49:23
问题 How do you handle passwords for services when the user enters something that is best represented in Unicode or some other non-Latin character encoding? Specifically, can you use a Cyrillic password as a password to Oracle? What do you do to verify a user's password against a Windows authentication mechanism if the password is provided as UTF-8? I have some ideas on how this should be handled in our code, but I'm looking for advice from others to make sure our direction is sound. 回答1: The

Password complexity regex with number or special character

你离开我真会死。 提交于 2019-12-14 03:49:15
问题 I've got some regex that'll check incoming passwords for complexity requirements. However it's not robust enough for my needs. ((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,20}) It ensures that a password meets minimum length, contains characters of both cases and includes a number. However I need to modify this so that it can contain a number and/or an allowed special character. I've even been given a list of allowed special characters. I have two problems, delimiting the special characters and making

how to get a password input in c++ console application [duplicate]

只愿长相守 提交于 2019-12-14 03:44:44
问题 This question already has answers here : Reading a password from std::cin (4 answers) Closed 2 years ago . what is the technique to get a masked password input as follows: 回答1: #include <iostream> #include<windows.h> // for system("pause") #include<conio.h> //for getch() using namespace std; int main() { char x[10]; cout<<"enter a password\n"; for(int i=0; i<10;i++){ x[i]=getch(); cout<<"*"; if(x[i]=='\r') //check if enter key is pressed break; else if(x[i]=='\b'){ if(i==0) cout<<"\b"<<" "<<"

Change the password for a Wi-Fi profile

本小妞迷上赌 提交于 2019-12-14 03:41:50
问题 In the long-term care hospital where I volunteer, on the first day of every month, the password for the Guest Wi-Fi connection changes. This causes a lot of work for the staff and a lot of frustration for the patients, many of whom have very limited mobility. (Yes, the real solution is to get the IT team to keep the same password, but that's not going to happen). Most of the patients connect to the outside world through Windows laptops. I'd like to create a batch script that we can install on

How to check with loops how many times user punched a password?

◇◆丶佛笑我妖孽 提交于 2019-12-14 03:36:01
问题 On my homework assignment I have to set up a test that ask the user for the password ( three times). If the user punches wrong password three times, then I must display a message " Wrong password". Also I have to take into account three variants of the username and password I am thinking that I set up a predefined passwords like "test", "password" and so on. The same I will do with the usernames. So basically I just know how to count how many times the user punches the username and password..

phpmyadmin - difference between md5() and password()

岁酱吖の 提交于 2019-12-14 03:15:31
问题 I would like to create a login application using PHP and phpmyadmin databases and want the password to be encrypted so is there another type than md5() and password() to encrypt text? what the difference between md5() and password()? what is the better betweeb md5() and password()? Thank you, hopefully can be benefit to other *edit I Prefer 1 way hash method for this one :) 回答1: All the answers you can find in the official documentation. Please always start with that before asking questions.