Tag Info

New answers tagged

2

Use a gpg-agent and provide your password as: __password=$(gpg --decrypt /path/to/password.gpg) in your script. Of course, you need to previously encrypt it: $ echo "correct_horse_battery_staple" > password $ gpg --encrypt password


5

Adding a little bit of historical perspective, the idea of sleeping after a bad password is not just found in PAM-based systems. It's very old. For eaxmple in the 4.4BSD login source you'll find this tasty fragment: /* we allow 10 tries, but after 3 we start backing off */ if (++cnt > 3) { if (cnt >= 10) { badlogin(username); ...


2

As others have answered, PAM is most likely the cause for this. The actual verification of the password only takes a very short time, the rest is a delay designed to prevent brute force attacks. On Debian, I have the following lines in /etc/pam.d/login: # Enforce a minimal delay in case of failure (in microseconds). # (Replaces the `FAIL_DELAY' setting from ...


2

See this answer on StackOverflow that quotes the The Linux-PAM Module Writers' Guide: As directed by this file, one of more of the modules may fail causing the pam_...() call to return an error. It is desirable for there to also be a pause before the application continues. The principal reason for such a delay is security: a delay acts to discourage brute ...


0

I don't use Archlinux myself, so I don't know exactly, but this sounds like a mechanism against brute-force password guessing.


1

You could use something like expect to provide the credentials each time you want to connect. It's not super secure but gives you what you want. #!/usr/local/bin/expect -- set timeout -1 spawn gvfs-mount {args} expect "User" send "joe\n" expect "Password:" send "xxxxx\n" expect eof Source: gvfs-mount specify username password


2

You can try the following settings, found here: http://fooninja.net/2010/10/07/get-rid-of-wrong-password-delay-in-linux/ Disable delay in Ubuntu and Debian: Edit /etc/pam.d/common-auth and add nodelay: e.g.: auth [success=2 default=ignore] pam_unix.so nullok_secure changed to auth [success=2 default=ignore] pam_unix.so nullok_secure ...


0

chage doesn't handle date differences by itself, but you can let the shell take care of that and give chage a number of days since 1970-01-01 instead of a YYYY-MM-DD date representation: chage -E $(( $(date +%s)/3600/24 + 90 )) userid (Replace 90 with any number of days.) Changing the expiration date of the password rather than the account is a little ...


0

You might look at using an SSH tunnel. You can setup the database to listen on a local port and allow a user to connect without a password on that port (reject all connections other than 127.0.0.1 on a specific interface) and then use SSH to negotiate a tunnel to that port. You then use certificate authentication to connect to SSH, this is both harder to ...


0

Assuming your user and pass are stored in user.txt and pass.txt Encrypt with: $ openssl aes-256-cbc -salt -in user.txt -out user.txt.enc -pass file:pass.txt Decrypt with: $ openssl aes-256-cbc -d -salt -in user.txt.enc -out user.txt.dec -pass file:pass.txt In order to have more secure encryption you can try to use you own complex salt with -S "your ...


1

Instead of hard coding the password in your shell script, you can use the oracle password repository to use the password in your shell script. This tool uses a simple file to stores the passwords encrypted. You can secure this file to make it non-accessible for others. The tool can be found here. You can see the installation steps of this tool from here.


54

Since cracklib is open source, the answer can be found in the source code. "Too simplistic/systematic" means that there are too many characters that are preceded by one of their alphabetical neighbors. Hence "ab" or "ba" are considered bad, but "ac" or "ca" are OK since the b is omitted. Before this patch from 2010-03-02, it allows at most four characters ...


30

On Fedora 19 When I run it I get OK. I'm on Fedora 19. $ echo 'M1uG*xgRCthKWwjIjWc*010iSthY9buc' | cracklib-check M1uG*xgRCthKWwjIjWc*010iSthY9buc: OK Here's the version info: $ rpm -qfi /usr/sbin/cracklib-check | grep -E "Version|Release" Version : 2.8.22 Release : 3.fc19 NOTE: I'd try it with single quotes instead of double qutoes too since ...



Top 50 recent answers are included