Tag Info

Hot answers tagged

11

The best kind of approach here is to do something like: mysqldump --defaults-extra-file=/path/to/auth.cnf ... Where auth.cnf looks like: [client] user=the-user password=the-password Then make sure the file is only readable by whomever is meant to run that script. The script itself can be world readable.


6

This password is hashed with the traditional DES-based method. This method is not so broken that it allows directly finding the password from the hash. It requires brute force, i.e. calculating password hashes until you find the right one. This hash method is broken in that the hash calculation is relatively fast, and the password is limited to 8 characters ...


4

Your root password is qwer134. % /usr/sbin/john --show pwdfile root:qwer134:0:0:Super-User,,,,,,,:/:/bin/ksh lp:passwd1:9:9:Print Spooler Owner:/var/spool/lp:/bin/sh nuucp:NO PASSWORD:10:10:Remote UUCP User:/var/spool/uucppublic:/usr/lib/uucp/uucico 3 password hashes cracked, 0 left It took john 2.5 days to find the root password and could easily have ...


4

Simply change permissions of the files in a way everyone could read them, but not alter them. When you use ls -l to list your files, you get something like ls -l file -rw-rwxr-- 1 rafael Grp 1620 Aug 18 14:58 file That first set of dashes/letters sets the permitting of three distinct (but not exclude each other) groups, namely User ...


4

The usual way to change the password is to use the passwd(1) command. If you want to use chpasswd(8) or usermod(8) you shoould carefully RTFM. Be sure that the given password is compatible with the system configuration. And sudo should apply to the chpasswd command, so you probably want echo 'user:passwd' | sudo chpasswd In your case sudo echo ...


4

Setting a password with passwd or chpasswd generates a random salt, so users who happen to have the same password would not have identical hashes. In order to have identical hashes this way, you'd have to have a misconfigured system that somehow doesn't save entropy between reboots, and systems that are so completely identical as to repeat the random seed ...


3

Most modern Unix systems use PAM to handle authentication. The pam_unix module is the one that does password authentication against /etc/password and /etc/shadow. However, you shouldn't reinvent the wheel. Asking for the user's password and running as root is a basic configuration of sudo, the de facto standard way to elevate privileges. Note that properly ...


3

About your actual question, see taliezin's answer (and accept that one ;) About your other problem: Search for the string 8sh9JBUR0VYeQ on the disk to figure out the disk block(s) it resides in. Then dd that disk block(s) into a file, replace that string with a known password hash (the old crypt() one - same length) and write the disk block(s) back to the ...


3

Go to http://www.openwall.com/john/ and find the URL of the latest community-enhanced version, which is in xz format. wget http://www.openwall.com/john/j/john-1.8.0-jumbo-1.tar.xz tar xf john-1.8.0-jumbo-1.tar.xz sudo apt-get install libssl-dev cd john-1.8.0-jumbo-1/src && ./configure && make cd ../run sudo ./unshadow /etc/passwd /etc/shadow ...


3

you might screw up permissions in your config file you might check your config file into source control you might be working on an open source project so cannot put passwords in source control Answer: use an env var


2

Leaving a plain text password in any file is always a bad idea in case your system is ever compromised. Sometimes it is unavoidable. To make this "secure" you should limit this activity to a very limited user and also leave these sensitive options in a defaults file. To solve your issue specifically, from the mysql man page: If you use the short option ...


2

SSH keys First of all, the best solution for you would be to create new ssh keypair and use this key to login to all your servers (or some, based on preferences). If you don't know how, you can find it many times here on stackexchange, but shortcut: ssh-keygen; ssh-copy-id your-host Basically you should set passphrase for your key, so you will log in ...


1

In Keepass2, "Add Entry," and set "Title" to "GPG." Move from "Entry" tab to "Auto-Type" tab. Select "Override default sequence" and set to "{PASSWORD}". Before you send email, open Keepass2 with Keepass2 password. Ask IceDove with Enigmail to "Send" and pinentry should appear (locking keyboard, preventing "Ctrl+V" (or any other keyboard shortcut you ...



Only top voted, non community-wiki answers of a minimum length are eligible