An interesting article today: Simple things are complicated: making a show password option. It referenced Government Design Principles: Make things open: it makes things better which I thought was an interesting and sensible government policy…
Tag Archives: password
So I found this article which said:
$ sudo -u postgres psql
postgres=> alter user postgres password 'apassword'; postgres=> create user your-user createdb createuser password 'passwd'; postgres=> create database your-db-name owner your-user; postgres=> \q
Note: to enable password logins for the ‘postgres’ admin account, edit: /etc/postgresql/9.4/main/pg_hba.conf and after this line:
local all postgres peer
Add this line:
local all postgres md5
Disable Password Authentication for SSH
See How to Disable Password Authentication for SSH.
ChallengeResponseAuthentication no PasswordAuthentication no UsePAM no
Then restart the SSH server:
service sshd restart
Change user’s password in Kerberos with kadmin
To change a user’s Kerberos password (on charity):
sudo kadmin -p root -w `cat /home/jj5/kadmin_root_pass` -q 'cpw eguser'
Where ‘eguser’ is the username of the account being changed.
About Secure Password Hashing
Found an interesting article: About Secure Password Hashing.
Salted Password Hashing – Doing it Right
Today I read Salted Password Hashing – Doing it Right which was a good run-down on how to do password hashing. The article linked to phpass: Portable PHP password hashing framework which is a library for hashing passwords.
Change root password in MySQL
Needed to set a MySQL root password. Found this article which suggested a way when no password is yet configured:
mysqladmin -u root password NEWPASSWORD
And a way when a password is already configured:
mysqladmin -u root -p'oldpassword' password newpass
Note: you use ‘mysqladmin’ not ‘mysql’.
Password Best Practice
I read Password Primer today:
- Use at least 8-10 characters.
- Interchange upper and lower case letters with numbers and symbols.
- Consider a “Passphrase” like “Every good band deserves fans”: “!eGbAdfns2”
- Change your password every 6 to 8 months and immediately if you believe it’s been compromised.
- NEVER share your password with anyone you don’t trust – some would say never share your password PERIOD.
- Don’t write your password(s) on sticky notes and then post them to your monitor!
- Avoid using the same passwords for all of your accounts.
- Never send your password to someone in an e-mail.
- Don’t use the “Remember Password” option in browsers or websites
- NEVER make your login and your password the same thing.
Setting user expiry with ‘chage’
Learned about the chage command today. Can be used to set the expiry of a Linux account. There’s some more information about disabling user accounts.
Portable PHP password hashing framework
Learned about the Portable PHP password hashing framework today.