passwords

How can I transfer a file using scp without a password from a Perl script?

I am writing a Perl script that needs to transfer files between computers using scp. I know about public key authentication, but I need the script to be fully automated, so I can't visit the machines to set up the keys before the script is run. Is there any way to either pass the password to scp from the Perl script or set up the keys f...

Problem with restoring MySQL database - mysqldump question

I made a backup of my_database like this: mysqldump --add-drop-database --databases --user=my_username --password=my_password my_database > backup.sql Then I deleted the database completely, and tried to restore it like this: mysql --user=my_username --password=my_password my_database < backup.sql I got the following err...

.htaccess multiple authorization for sub-child directories

I'm looking to edit my .htaccess file to control AuthTypeBasic for it's own directory and child directories differently. I currently have password protection (AuthType Basic) set up on the a folder and would like to set up some of the children directories to be exempt from this password protection and other child directories to have uni...

Forbid access to files in a simple PHP login system

Hi guys! I wrote this VERY simple PHP login system: <?php session_start(); $error = ''; if (isset($_POST['username']) && isset($_POST['password'])) { if ($_POST['username'] == 'user' && $_POST['password'] == 'pass') { $_SESSION['client'] = 'ok'; Header ("location: /kit/kit/index....

Is it insecure to pass initialization vector and salt along with ciphertext?

I'm new to implementing encryption and am still learning basics, it seems. I have need for symmetric encryption capabilities in my open source codebase. There are three components to this system: A server that stores some user data, and information about whether or not it is encrypted, and how A C# client that lets a user encrypt the...

DOS .bat script to copy files to a secure network location, how to supply credentials?

The environment is Windows Web Server 2008, and I'm just trying to copy a folder full of files to a network location (a managed backup network folder). Here is my .bat file, running in the folder with my .bat files: copy *.bak \\networklocation\*.bak pause however \\networklocation requires username x and password y, so running the sc...

Use Authlogic with Typus

Hi, I'm switching to Typus because I prefer its UI over ActiveScaffold and I love the way you can set roles for the admin section. We need that. However, where ActiveScaffold worked flawlessly with Authlogic, Typus doesn't. I'd like to combine the two anyway, but can't seem to find out how. Typus has very basic password encryption, but...

Generate password in python

Hi Folks, I'dl like to generate some alphanumeric passwords in python. Some possible ways are: import string from random import sample, choice chars = string.letters + string.digits length = 8 ''.join(sample(chars,length)) # way 1 ''.join([choice(chars) for i in range(length)]) # way 2 But I don't like both because: way 1 only un...

grails Acegi: How to check for expired password

Hi everyone. This is a branch from this question. Branched out because the original purpose of that question was something else. I'm looking for the easiest way to check if a password is expired. A password will expire if its older than N days, where N is a value stored in another table. My User class looks like this: Security config...

Password masking does not terminate the program when needed

I developed the following application in which I needed to masking the PIN and terminate the program after the user has entered the wrong PIN thrice. However, the program terminates only if i close the stopThread at the beginning (I commented it in the code below), however the password masking does not occur for all the three channces wh...

From builtin ASP.NET membership to custom membership password problem

We have a production site using ASP.NET built in membership. Now we wan't to extend the tables with some custom properties so we built a custom membership provider using ADO.Net entities. Everything is working fine, we can create new users and the login controls are also working. We imported every existing user from the aspnet_Membershi...

password fetch using python

import pwd import operator # Load all of the user data, sorted by username all_user_data = pwd.getpwall() interesting_users = sorted((u for u in all_user_data if not u.pw_name.startswith('_')), key=operator.attrgetter('pw_name')) # Find the longest le...

How do I setpassword to compressed zip files in Python

I get this error when I try to set a password to a zip file. Below is the code/error I get. Please give me an example of the correct way to do it. This is just the password part of the script... the entire script is to long to post. Code: password = "dog" password = zipfile.setpassword(pwd) Error received when hitting the password...

Password protect a whole .net mvc application?

Hellu, I want to put a password protection on my entire web application for development and testing purposes. I would like some simple way to do this (global asax, webconfig etc), which means I don't have to change very much in the rest of my application. The password and username can be stored in the code/webconfig or whatever. Since ...

How to change Gmail's password programmatically?

I came across this issue recently where I needed to change a Gmail's account password programmatically and am still thinking about the ideal approach. Basically by providing Gmail's current username/password my application would then authenticate and request the password to be changed to a new one provided and return success. CURL seem...

What function returns a Drupal-6-valid password hash?

I want to make a script to insert some 100 users into a Drupal 6 database - their username, mail and password hash. After reading about the PHP class that Drupal 6 uses, I'm not sure I can pull this off. My method was to send every user a mail like "Hello, x! Your new password is y", then insert the hashed "y" into Drupal's user table. ...

How do I get TortoiseHG to remember my password?

Possible Duplicate: Store password in TortoiseHg Seems simple enough. When doing a sync, I tire of entering my password for each sync, each repo. I seem to recall knowing how to do it somewhere once upon a time, but shy of going in and updating EACH project's syncing URLs, is there another method? That'll be tedious, so I'm so...

Alternative login system with file upload

I was wondering whether a login system that implies that have to upload a certain file and then the server verifies that this is equal to the one stored in the server would be useful. I was thinking that to its advantage, it would have that the "password" (the file) could be quite large (without you having to remember it). Also it woul...

Super Simple Android Help: Change Image on Correct Password

So I am a complete newb, and am currently taking an intro to Mobile Programming course in which we use Android (I have some experience with Java). I am trying to do a simple assignment which displays a text field and an image, and upon entering the correct "password" and pressing enter, the image changes. Should be so simple! But I am ...

Security Beyond a Username/Password?

I have a webapp that requires security beyond that of a normal web application. When any user visits the domain name, they are presented with two text fields, a username field, and a password field. If they enter a valid user/pass, they get access to the web application. Standard stuff. However, I'm looking for additional security be...