4 ms·
The .bash_history file is mode 0600, regardless of directory permissions. Was this not always the case?
by boring_twenties 6y ago
The .bash_history file is mode 0600, regardless of directory permissions. Was this not always the case?
- sillysaurusx 6y agoHeh. Looks like I’ve been out of the game longer than I thought. It’s suddenly been 6 years. Welp. Yes, I misremembered that specific example. Still, you’d be amazed how often people leave json credentials in their homedir that can be used to pivot to e.g. S3.
- bombcar 6y agoThe number of bash history files with accidental passwords pasted into them is quite high. Another reason I don’t sudo and instead ssh
- throwawayboise 6y agoShell history files for admin accounts should be disabled (or at least kept short) for this reason.
- jcpham2 6y agoBut I really really like shell history files if I have to come behind someone!
- bombcar 6y agoInteresting idea - make it so all your passwords start with the same four characters (say Ab54) - (it's hard to get good passwords you can safely type at a prompt anyway) and then have a script that searches your history/log files for strings beginning with the Ab54 characters and replacing them with XXXX or similar. All sorts of horrible side effects can immediately be identified.